From 721df61f4b21a96aeed9a65e1b59ee05833ea813 Mon Sep 17 00:00:00 2001 From: MindTooth <33870508+MindTooth@users.noreply.github.com> Date: Sat, 6 Jan 2018 12:39:15 +0100 Subject: [PATCH] brew.fish: add the leaves option (#4645) --- CHANGELOG.md | 1 + share/completions/brew.fish | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b2e9e927..ca471d1b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,7 @@ This section is for changes merged to the `major` branch that are not also merge - `ngrok` (#4642) - Improved completions for - `git` (#4395, #4396, #4592) + - `brew` -- diff --git a/share/completions/brew.fish b/share/completions/brew.fish index 0c70c0a61..b7f304dfb 100644 --- a/share/completions/brew.fish +++ b/share/completions/brew.fish @@ -74,6 +74,10 @@ function __fish_brew_installed_formulas brew list end +function __fish_brew_leaves + brew leaves +end + function __fish_brew_outdated_formulas brew outdated end @@ -96,7 +100,6 @@ complete -f -c brew -n '__fish_brew_needs_command' -a audit -d 'Check formula' complete -f -c brew -n '__fish_brew_using_command audit' -a '(__fish_brew_formulae)' # bottle - complete -f -c brew -n '__fish_brew_needs_command' -a bottle -d 'Create a binary package' complete -f -c brew -n '__fish_brew_using_command bottle' -l 'homebrew-developer' -d 'Output developer debug information' complete -f -c brew -n '__fish_brew_using_command bottle' -l 'no-revision' -d 'Do not bump the bottle revision number' @@ -187,6 +190,10 @@ complete -f -c brew -n '__fish_brew_using_command install' -l build-bottle -d 'O complete -f -c brew -n '__fish_brew_using_command install' -l bottle-arch -a 'core core2 penryn g3 g4 g4e g5' -d 'Optimize for the specified CPU architecture' complete -c brew -n '__fish_brew_using_command install' -a '(__fish_brew_formulae)' +# leaves +complete -f -c brew -n '__fish_brew_needs_command' -a 'leaves' -d 'List installed top level formulae' +complete -f -c brew -n '__fish_brew_using_command leaves' -a '(__fish_brew_leaves)' + # link complete -f -c brew -n '__fish_brew_needs_command' -a 'link ln' -d 'Symlink installed formula' complete -f -c brew -n '__fish_brew_using_command link' -l overwrite -d 'Overwrite existing files'