aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2012-07-11 20:08:09 -0700
committerAdam Vandenberg2012-07-11 20:08:09 -0700
commite0b8531bc72d3297d160a108b97f9af97b5b85e1 (patch)
tree08dbaaa70f9819fabde114f6ddba83532b0fc134 /Library
parent9cb4c626aeb149db2ddf79640c3c7e1a9de73e8e (diff)
downloadbrew-e0b8531bc72d3297d160a108b97f9af97b5b85e1.tar.bz2
Add completions for brew link
Diffstat (limited to 'Library')
-rw-r--r--Library/Contributions/brew_bash_completion.sh22
1 files changed, 20 insertions, 2 deletions
diff --git a/Library/Contributions/brew_bash_completion.sh b/Library/Contributions/brew_bash_completion.sh
index acfe97172..6b9dc533c 100644
--- a/Library/Contributions/brew_bash_completion.sh
+++ b/Library/Contributions/brew_bash_completion.sh
@@ -211,6 +211,24 @@ _brew_install ()
__brew_complete_formulae
}
+_brew_link ()
+{
+ local cur="${COMP_WORDS[COMP_CWORD]}"
+ case "$cur" in
+ --*)
+ if __brewcomp_words_include "--dry-run"; then
+ return
+ elif __brewcomp_words_include "--force"; then
+ return
+ else
+ __brewcomp "--dry-run --force"
+ return
+ fi
+ ;;
+ esac
+ __brew_complete_installed
+}
+
_brew_list ()
{
local cur="${COMP_WORDS[COMP_CWORD]}"
@@ -375,7 +393,6 @@ _brew ()
home
info abv
install
- link ln
list ls
log
missing
@@ -401,7 +418,7 @@ _brew ()
case "$cmd" in
--cache|--cellar|--prefix) __brew_complete_formulae ;;
audit|cat|edit|home) __brew_complete_formulae ;;
- link|ln|test|unlink) __brew_complete_installed ;;
+ test|unlink) __brew_complete_installed ;;
upgrade) __brew_complete_outdated ;;
cleanup) _brew_cleanup ;;
create) _brew_create ;;
@@ -410,6 +427,7 @@ _brew ()
fetch) _brew_fetch ;;
info|abv) _brew_info ;;
install) _brew_install ;;
+ link|ln) _brew_link ;;
list|ls) _brew_list ;;
log) _brew_log ;;
missing) __brew_complete_formulae ;;