Skip to content

Commit

Permalink
feat: communicate nothing to remove (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianChiarulli authored Nov 13, 2022
1 parent f1235c0 commit 81b211b
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions zap.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,18 @@ _zap_clean() {
unused_plugins+=("$plugin_name")
fi
done
for p in ${unused_plugins[@]}; do
echo -n "Remove: $p? (y/n): "
read answer
if [[ $answer == "y" ]]; then
rm -rf "$HOME/.local/share/zap/plugins/$p"
echo "removed: $p"
fi
done
if [ ${#unused_plugins[@]} -eq 0 ]; then
echo "Nothing to remove"
else
for p in ${unused_plugins[@]}; do
echo -n "Remove: $p? (y/n): "
read answer
if [[ $answer == "y" ]]; then
rm -rf "$HOME/.local/share/zap/plugins/$p"
echo "removed: $p"
fi
done
fi
}

_zap_update() {
Expand Down

0 comments on commit 81b211b

Please sign in to comment.