Skip to content

Commit

Permalink
feat: add multi select shortcut hint
Browse files Browse the repository at this point in the history
  • Loading branch information
gschurck committed Sep 17, 2024
1 parent 182d354 commit 5fb6517
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fuzzybrew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@

# fuzzybrew.sh

VERSION="1.0.0"
VERSION="1.0.1"

fuzzybrew() {
local query="$1"
local selected_packages
selected_packages=$(
# Search all packages, evaluate all formulae, and display descriptions
brew search --eval-all --desc "" | \
# Remove the ":" in the list"
# Remove the ":" and everything after it to keep just the package name in the list
sed 's/:.*//' | \
# Display the list in fzf for fuzzy search
fzf --multi --ansi --query "$query" \
--header 'Press CTRL-C to quit, ENTER to install' \
--header 'Press CTRL-C to quit, ENTER to install, SHIFT-TAB to select multiple' \
--preview 'HOMEBREW_COLOR=1 brew info {1}' \
--preview-window=right:60%:wrap
)
Expand Down

0 comments on commit 5fb6517

Please sign in to comment.