fix: improve zk command check and error handling
parent
ae2a439c14
commit
e8962144e5
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue