Back to Ohmyzsh

brew plugin

plugins/brew/README.md

latest5.9 KB
Original Source

brew plugin

The plugin adds several aliases for common brew commands.

To use it, add brew to the plugins array of your zshrc file:

zsh
plugins=(... brew)

Shellenv

If brew is not found in the PATH, this plugin will attempt to find it in common locations, and execute brew shellenv to set the environment appropriately. This plugin will also export HOMEBREW_PREFIX="$(brew --prefix)" if not previously defined for convenience.

In case you installed brew in a non-common location, you can still set BREW_LOCATION variable pointing to the brew binary before sourcing oh-my-zsh.sh and it'll set up the environment.

Aliases

AliasCommandDescription
babrew autoremoveUninstall unnecessary formulae.
bcfgbrew configShow Homebrew and system configuration info useful for debugging.
bcibrew info --caskDisplay information about the given cask.
bcinbrew install --caskInstall the given cask.
bclbrew list --caskList installed casks.
bcnbrew cleanupRun cleanup.
bcobrew outdated --caskReport all outdated casks.
bcrinbrew reinstall --caskReinstall the given cask.
bcubcbrew upgrade --cask && brew cleanupUpgrade outdated casks, then run cleanup.
bcubobrew update && brew outdated --caskUpdate Homebrew data, then list outdated casks.
bcupbrew upgrade --caskUpgrade all outdated casks.
bdrbrew doctorCheck your system for potential problems.
bfubrew upgrade --formulaUpgrade only formulae (not casks).
bibrew installInstall a formula.
bihbrew install --HEADInstall a formula with --HEAD
blbrew listList all installed formulae.
bobrew outdatedList installed formulae that have an updated version available.
brbrew reinstallReinstall a formula.
brewpbrew pinPin a specified formula so that it's not upgraded.
brewsbrew list -1List installed formulae or the installed files for a given formula.
brewspbrew list --pinnedList pinned formulae, or show the version of a given formula.
brhbrew reinstall --HEADReinstall a formula with --HEAD
bsbrew searchPerform a substring search of cask tokens and formula names for text.
bslbrew services listList all running services.
bsoffbrew services stopStop the service and unregister it from launching at login (or boot).
bsoffabsoff --allStop all started services.
bsonbrew services startStart the service and register it to launch at login (or boot).
bsonabson --allStart all stopped services.
bsrbrew services runRun the service without registering to launch at login (or boot).
bsrabsr --allRun all stopped services.
bubrew updateUpdate brew and all installed formulae.
bubobrew update && brew outdatedUpdate Homebrew data, then list outdated formulae and casks.
bubububo && bupDo the last two operations above.
bugbcbrew upgrade --greedy && brew cleanupUpgrade outdated formulae and casks (greedy), then run cleanup.
bupbrew upgradeUpgrade outdated, unpinned brews.
buzbrew uninstall --zapRemove all files associated with a cask.

Completion

This plugin configures paths with Homebrew's completion functions automatically, so you don't need to do it manually. See: https://docs.brew.sh/Shell-Completion#configuring-completions-in-zsh.

With the release of Homebrew 1.0, they decided to bundle the zsh completion as part of the brew installation, so we no longer ship it with the brew plugin; now it only has brew aliases. If you find that brew completion no longer works, make sure you have your Homebrew installation fully up to date.