Last active
December 1, 2024 14:59
-
-
Save pvdb/7d5478b5f3bb261f542adcea4bdc9c07 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# | |
# INSTALLATION | |
# | |
# ln -s ${PWD}/brew-browse $(brew --prefix)/bin/ | |
# sudo ln -s ${PWD}/brew-browse /usr/local/bin/ | |
# | |
# PREREQUISITES | |
# | |
# brew install fzf | |
# | |
# USAGE | |
# | |
# search for Homebrew formulae by description | |
# | |
# $ brew browse [fzf options] | |
# | |
# INSPIRATION | |
# | |
# https://github.com/borestad/dotjitsu/commit/656980488391bf5c36921b2b61607bc7d15b2bd1 | |
# | |
grep -E '^ *desc *".*"$' "$(brew --prefix)"/Cellar/*/*/.brew/*.rb \ | |
| perl -ne 'm{^(.*?)\.rb: *desc *"(.*)"$} and print "$1|$2\n"' \ | |
| column -t -s '|' \ | |
| fzf --reverse "$@" ; | |
# That's all Folks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment