From 532c7c1289c194d184feddb8c6960125eb2887e8 Mon Sep 17 00:00:00 2001 From: punkfairie <23287005+punkfairie@users.noreply.github.com> Date: Sat, 10 Feb 2024 19:38:09 -0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20brew=20fzf=20functions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- homebrew/.config/fish/functions/bdp.fish.symlink | 11 +++++++++++ homebrew/.config/fish/functions/bip.fish.symlink | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 homebrew/.config/fish/functions/bdp.fish.symlink create mode 100644 homebrew/.config/fish/functions/bip.fish.symlink diff --git a/homebrew/.config/fish/functions/bdp.fish.symlink b/homebrew/.config/fish/functions/bdp.fish.symlink new file mode 100644 index 0000000..bfda5f8 --- /dev/null +++ b/homebrew/.config/fish/functions/bdp.fish.symlink @@ -0,0 +1,11 @@ +#!/usr/bin/env fish + +function bdp -d "Delete one or more selected Homebrew packages" + set -f uninst (brew leaves | fzf -m) + + if test -n "$uninst" + for pkg in (echo $uninst) + brew uninstall $pkg + end + end +end diff --git a/homebrew/.config/fish/functions/bip.fish.symlink b/homebrew/.config/fish/functions/bip.fish.symlink new file mode 100644 index 0000000..77ee5f9 --- /dev/null +++ b/homebrew/.config/fish/functions/bip.fish.symlink @@ -0,0 +1,11 @@ +#!/usr/bin/env fish + +function bip -d "fzf and install one or more Homebrew packages" + set -f inst (brew search "$argv" | fzf -m) + + if test -n "$inst" + for pkg in (echo $inst) + brew install $pkg + end + end +end