fix: improve zk command check and error handling

master
Hektor Misplon 2025-05-09 22:21:15 +02:00
parent ae2a439c14
commit e8962144e5
1 changed files with 6 additions and 1 deletions

View File

@ -11,5 +11,10 @@ read -p "Would you like open your zettelkasten? [y/N] " -n 1 -r
echo
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