diff options
| author | Oleg Voronkovich <oleg-voronkovich@yandex.ru> | 2023-06-15 12:01:02 +0300 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-15 11:01:02 +0200 | 
| commit | 14f0f2971f42952e2eb78fdc2535538e98323b2b (patch) | |
| tree | f9c7c5f963b9eb8c8b3413f9576548967f4f9033 /plugins/brew | |
| parent | cb8b677488c7a20278917af58dfccd72cd40e1b1 (diff) | |
| download | zsh-14f0f2971f42952e2eb78fdc2535538e98323b2b.tar.gz zsh-14f0f2971f42952e2eb78fdc2535538e98323b2b.tar.bz2 zsh-14f0f2971f42952e2eb78fdc2535538e98323b2b.zip  | |
feat(brew): autoconfigure completions (#11152)
Diffstat (limited to 'plugins/brew')
| -rw-r--r-- | plugins/brew/README.md | 2 | ||||
| -rw-r--r-- | plugins/brew/brew.plugin.zsh | 4 | 
2 files changed, 6 insertions, 0 deletions
diff --git a/plugins/brew/README.md b/plugins/brew/README.md index 412daae63..4730194bc 100644 --- a/plugins/brew/README.md +++ b/plugins/brew/README.md @@ -33,6 +33,8 @@ defined for convenience.  ## 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 diff --git a/plugins/brew/brew.plugin.zsh b/plugins/brew/brew.plugin.zsh index f6abe0875..b52664a39 100644 --- a/plugins/brew/brew.plugin.zsh +++ b/plugins/brew/brew.plugin.zsh @@ -25,6 +25,10 @@ if [[ -z "$HOMEBREW_PREFIX" ]]; then    export HOMEBREW_PREFIX="$(brew --prefix)"  fi +if [[ -d "$HOMEBREW_PREFIX/share/zsh/site-functions" ]]; then +  fpath+=("$HOMEBREW_PREFIX/share/zsh/site-functions") +fi +  alias bcubc='brew upgrade --cask && brew cleanup'  alias bcubo='brew update && brew outdated --cask'  alias bcubc='brew upgrade --cask && brew cleanup'  | 
