From 4e2096f21a68fd3f95248cd5a0482fdff112e146 Mon Sep 17 00:00:00 2001 From: Lawrence Date: Thu, 5 Sep 2019 23:18:30 -0400 Subject: [PATCH 1/6] Add cask completions to `brew cleanup` --- completions/fish/brew.fish | 1 + 1 file changed, 1 insertion(+) diff --git a/completions/fish/brew.fish b/completions/fish/brew.fish index 9813126357..45f866a2a8 100644 --- a/completions/fish/brew.fish +++ b/completions/fish/brew.fish @@ -253,6 +253,7 @@ __fish_brew_complete_arg 'cat' -a '(__fish_brew_suggest_formulae_all)' __fish_brew_complete_cmd 'cleanup' "Remove old installed versions" __fish_brew_complete_arg 'cleanup' -a '(__fish_brew_suggest_formulae_installed)' +__fish_brew_complete_arg 'cleanup' -a '(__fish_brew_suggest_casks_installed)' __fish_brew_complete_arg 'cleanup' -l prune -d "Remove all cache files older than given number of days" -a '(seq 1 5)' __fish_brew_complete_arg 'cleanup' -s n -l dry-run -d "Show what files would be removed" __fish_brew_complete_arg 'cleanup' -s s -d "Scrub the cache, removing downloads for even the latest versions of formulae" From e19b5485fdfd70c72e13c182faf189a752819726 Mon Sep 17 00:00:00 2001 From: Lawrence Date: Thu, 5 Sep 2019 23:19:21 -0400 Subject: [PATCH 2/6] Drop fish completions for now-deleted `brew prune` command --- completions/fish/brew.fish | 4 ---- 1 file changed, 4 deletions(-) diff --git a/completions/fish/brew.fish b/completions/fish/brew.fish index 45f866a2a8..e39f74d56e 100644 --- a/completions/fish/brew.fish +++ b/completions/fish/brew.fish @@ -480,10 +480,6 @@ __fish_brew_complete_cmd 'postinstall' "Rerun the post-install steps for formula __fish_brew_complete_arg 'postinstall' -a '(__fish_brew_suggest_formulae_installed)' -__fish_brew_complete_cmd 'prune' "Remove dead symlinks" -__fish_brew_complete_arg 'prune' -s n -l dry-run -d "Show what files would be removed" - - __fish_brew_complete_cmd 'reinstall' "Uninstall and then install again" __fish_brew_complete_arg 'reinstall' -a '(__fish_brew_suggest_formulae_installed)' From 894cb54af7d85df0ac86bda221ff2ba7cc489404 Mon Sep 17 00:00:00 2001 From: Lawrence Date: Thu, 5 Sep 2019 23:34:28 -0400 Subject: [PATCH 3/6] Added `brew cask upgrade --dry-run` fish completion --- completions/fish/brew.fish | 1 + 1 file changed, 1 insertion(+) diff --git a/completions/fish/brew.fish b/completions/fish/brew.fish index e39f74d56e..5bb32f11f9 100644 --- a/completions/fish/brew.fish +++ b/completions/fish/brew.fish @@ -868,6 +868,7 @@ __fish_brew_complete_sub_arg 'cask' 'style' -l fix -d "Auto-correct any style er __fish_brew_complete_sub_cmd 'cask' 'upgrade' "Upgrades all outdated casks" __fish_brew_complete_sub_arg 'cask' 'upgrade' -l force +__fish_brew_complete_sub_arg 'cask' 'upgrade' -l dry-run __fish_brew_complete_sub_cmd 'cask' 'uninstall' "Uninstall the given Cask" __fish_brew_complete_sub_arg 'cask' 'uninstall remove rm' -l force -d "Uninstall even if the Cask is not present" From 479655149975b37ae0e370a27d340af9a06a0465 Mon Sep 17 00:00:00 2001 From: Lawrence Date: Sat, 7 Sep 2019 16:46:45 -0400 Subject: [PATCH 4/6] Add --language option to `brew install` and `brew audit` fish completion --- completions/fish/brew.fish | 1 + 1 file changed, 1 insertion(+) diff --git a/completions/fish/brew.fish b/completions/fish/brew.fish index 5bb32f11f9..a93bb4c661 100644 --- a/completions/fish/brew.fish +++ b/completions/fish/brew.fish @@ -851,6 +851,7 @@ __fish_brew_complete_sub_cmd 'cask' 'install' "Install the given Cask" __fish_brew_complete_sub_arg 'cask' 'install' -l force -d "Reinstall even if the Cask is already present" __fish_brew_complete_sub_arg 'cask' 'install' -l skip-cask-deps -d "Skip any Cask dependencies" __fish_brew_complete_sub_arg 'cask' 'install' -l require-sha -d "Abort if the Cask doesn't define a checksum" +__fish_brew_complete_sub_arg 'cask' 'audit install' -rl language -d "Set language of the Cask to install. The first matching language is used, otherwise the default language on the Cask. The default value is the language of your system." __fish_brew_complete_sub_cmd 'cask' 'list' "List installed Casks or staged files of the given installed Casks" __fish_brew_complete_sub_arg 'cask' 'list ls' -s 1 -d "Format output in a single column" From 994d92ab3205f4ae3b4920b2ad9b70d806976256 Mon Sep 17 00:00:00 2001 From: Lawrence Date: Sat, 7 Sep 2019 17:26:15 -0400 Subject: [PATCH 5/6] Fixed website documentation to mark that brew provides fish completions --- docs/Shell-Completion.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Shell-Completion.md b/docs/Shell-Completion.md index 2816561885..94b456916f 100644 --- a/docs/Shell-Completion.md +++ b/docs/Shell-Completion.md @@ -2,7 +2,7 @@ Homebrew comes with completion definitions for the `brew` command. Some packages also provide completion definitions for their own programs. -`zsh`, `bash` and `fish` are currently supported. (Homebrew provides `brew` completions for `zsh` and `bash`; `fish` provides its own `brew` completions.) +`zsh`, `bash` and `fish` are currently supported. (Homebrew provides `brew` completions for `zsh`, `bash`, and `fish`.) You must configure your shell to enable its completion support. This is because the Homebrew-managed completions are stored under `HOMEBREW_PREFIX` which your system shell may not be aware of, and since it is difficult to automatically configure `bash` and `zsh` completions in a robust manner, the Homebrew installer does not do it for you. From 109d2a6d0e94cd32217e58d87fff26be80912392 Mon Sep 17 00:00:00 2001 From: Lawrence Date: Sat, 7 Sep 2019 18:21:01 -0400 Subject: [PATCH 6/6] Deleted comment in parentheses --- docs/Shell-Completion.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Shell-Completion.md b/docs/Shell-Completion.md index 94b456916f..19355a07af 100644 --- a/docs/Shell-Completion.md +++ b/docs/Shell-Completion.md @@ -2,7 +2,7 @@ Homebrew comes with completion definitions for the `brew` command. Some packages also provide completion definitions for their own programs. -`zsh`, `bash` and `fish` are currently supported. (Homebrew provides `brew` completions for `zsh`, `bash`, and `fish`.) +`zsh`, `bash` and `fish` are currently supported. You must configure your shell to enable its completion support. This is because the Homebrew-managed completions are stored under `HOMEBREW_PREFIX` which your system shell may not be aware of, and since it is difficult to automatically configure `bash` and `zsh` completions in a robust manner, the Homebrew installer does not do it for you.