aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Polden <mpolden@mpolden.no>2024-01-26 14:33:22 +0100
committerMartin Polden <mpolden@mpolden.no>2024-01-26 14:33:22 +0100
commitd95cdffd61947cd628364e2f70c89a708635732b (patch)
tree1ee440c6bacbe59a753b391b49301cab2bf0be90
parent2294ebfc5af701f8411860d46eaf183cc867708e (diff)
zsh: show only relevant candidates for brew-fzf uninstall
-rw-r--r--zshrc5
1 files changed, 4 insertions, 1 deletions
diff --git a/zshrc b/zshrc
index e2a9685..17411a7 100644
--- a/zshrc
+++ b/zshrc
@@ -424,7 +424,10 @@ function restic-review {
# Fuzzy-finding wrapper for brew install, info and uninstall
function brew-fzf {
case "$1" in
- info|install|uninstall)
+ uninstall)
+ cat <(brew leaves) <(brew list --cask | sed "s/^/--cask /") | fzf --multi | xargs -r brew "$1"
+ ;;
+ info|install)
cat <(brew formulae) <(brew casks | sed "s/^/--cask /") | fzf --multi | xargs -r brew "$1"
;;
*)