aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorRobert Buonpastore2015-10-18 16:03:52 -0400
committerBaptiste Fontaine2015-11-19 11:04:16 +0100
commit6c5419fc5ba763640a7dc1695d989b6302909e5e (patch)
treeabfe6bec0f662ef67e56e1d48863a32411ba7f91 /Library
parenta9b380539cf26a54e7a112445e522701501cc5fc (diff)
downloadbrew-6c5419fc5ba763640a7dc1695d989b6302909e5e.tar.bz2
Filter "instal" from homebrew bash completions
Closes Homebrew/homebrew#45086. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
Diffstat (limited to 'Library')
-rw-r--r--Library/Contributions/brew_bash_completion.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/Library/Contributions/brew_bash_completion.sh b/Library/Contributions/brew_bash_completion.sh
index 5f9eeda6a..22dd73396 100644
--- a/Library/Contributions/brew_bash_completion.sh
+++ b/Library/Contributions/brew_bash_completion.sh
@@ -600,7 +600,10 @@ _brew ()
done
if [[ $i -eq $COMP_CWORD ]]; then
- __brewcomp "$(brew commands --quiet --include-aliases)"
+ # Do not auto-complete "instal" abbreviation for "install" command.
+ # Prefix newline to prevent not checking the first command.
+ local cmds=$'\n'"$(brew commands --quiet --include-aliases)"
+ __brewcomp "${cmds/$'\n'instal$'\n'/$'\n'}"
return
fi