fix: improve zk command check and error handling
This commit is contained in:
@@ -11,5 +11,10 @@ read -p "Would you like open your zettelkasten? [y/N] " -n 1 -r
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||||
[ -x "$(command -v zk)" ] zk || zk
|
if command -v zk &>/dev/null; then
|
||||||
|
zk
|
||||||
|
else
|
||||||
|
echo "Error: 'zk' command not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user