aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJulien Nicoulaud <julien.nicoulaud@gmail.com>2013-12-24 03:33:38 -0800
committerJulien Nicoulaud <julien.nicoulaud@gmail.com>2013-12-24 03:33:38 -0800
commit6d05992de19e7520c9bb9e25be8445269f092d79 (patch)
tree4eeb0e623b66a5763ee09899f88956d79b373a40 /src
parentMerge pull request #195 from babysnakes/fix-vagrant-completions (diff)
parentImprove the link command in _brew. (diff)
downloadzsh-completions-6d05992de19e7520c9bb9e25be8445269f092d79.tar
zsh-completions-6d05992de19e7520c9bb9e25be8445269f092d79.tar.gz
zsh-completions-6d05992de19e7520c9bb9e25be8445269f092d79.tar.bz2
zsh-completions-6d05992de19e7520c9bb9e25be8445269f092d79.tar.lz
zsh-completions-6d05992de19e7520c9bb9e25be8445269f092d79.tar.xz
zsh-completions-6d05992de19e7520c9bb9e25be8445269f092d79.tar.zst
zsh-completions-6d05992de19e7520c9bb9e25be8445269f092d79.zip
Merge pull request #193 from xuhdev/improve-brew-link
Improve the link command in _brew.
Diffstat (limited to 'src')
-rw-r--r--src/_brew13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/_brew b/src/_brew
index 7297076..1a94ead 100644
--- a/src/_brew
+++ b/src/_brew
@@ -108,6 +108,17 @@ case "$words[1]" in
_brew_all_formulae
_wanted formulae expl 'all formulae' compadd -a formulae
fi ;;
+ link|ln)
+ _arguments \
+ '(-n --dry-run)'{-n,--dry-run}'[All files would be linked or be deleted will be listed, but no real linking or deletion will be done]' \
+ '(--force)--force[Allow keg-only formulae to be linked]' \
+ '(--overwrite)--overwrite[Also delete files which already exist in the prefix while linking]' \
+ '1: :->forms' && return 0
+
+ if [[ "$state" == forms ]]; then
+ _brew_installed_formulae
+ _wanted installed_formulae expl 'installed formulae' compadd -a installed_formulae
+ fi ;;
list|ls)
_arguments \
'(--unbrewed)--unbrewed[files in brew --prefix not controlled by brew]' \
@@ -138,7 +149,7 @@ case "$words[1]" in
audit|home|homepage|log|info|abv|uses|cat|deps|edit|options)
_brew_all_formulae
_wanted formulae expl 'all formulae' compadd -a formulae ;;
- remove|rm|uninstall|unlink|cleanup|link|ln|pin|unpin|test)
+ remove|rm|uninstall|unlink|cleanup|pin|unpin|test)
_brew_installed_formulae
_wanted installed_formulae expl 'installed formulae' compadd -a installed_formulae ;;
tap)