Skip to content

Instantly share code, notes, and snippets.

@randomcamel
Last active June 16, 2021 20:54
Show Gist options
  • Save randomcamel/c7dd39d7bfa0d3c9078b443e3fa83abb to your computer and use it in GitHub Desktop.
Save randomcamel/c7dd39d7bfa0d3c9078b443e3fa83abb to your computer and use it in GitHub Desktop.
Homebrew went through an irritating phase where you had to use `brew search` instead of `brew cask search`, even though you still had to do `brew cask install`.
brew () {
if [[ "x$1" == "xcask" && "x$2" == "xsearch" ]]; then
echo '`brew cask search` is broken, translating for you...'
shift
/usr/local/bin/brew $*
else
/usr/local/bin/brew $*
fi
}
# for Vagrant it might be this, though I haven't tried it:
vagrant () {
if [[ "x$1" == "xdown" ]]; then
shift
${vagrant_binary} halt $*
else
#{vagrant_binary} $*
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment