Remove "*instal" aliases from bash completion
Remove all command aliases ending in "instal" (single letter L) from the bash completion. This has the practical effect of removing the aliases "instal" and "uninstal" from bash completion, allowing "install" and "uninstall" to be auto completed once the first three characters of each "ins" or "uni" are typed in.
This commit is contained in:
parent
e1bab7ede9
commit
3396387b52
@ -563,10 +563,10 @@ _brew() {
|
||||
|
||||
if [[ "$i" -eq "$COMP_CWORD" ]]
|
||||
then
|
||||
# Do not auto-complete "instal" abbreviation for "install" command.
|
||||
# Do not auto-complete "*instal" abbreviations for "*install" commands.
|
||||
# Prefix newline to prevent not checking the first command.
|
||||
local cmds=$'\n'"$(brew commands --quiet --include-aliases)"
|
||||
__brewcomp "${cmds/$'\n'instal$'\n'/$'\n'}"
|
||||
local cmds=$'\n'"$(brew commands --quiet --include-aliases | grep -v instal$)"
|
||||
__brewcomp "${cmds}"
|
||||
return
|
||||
fi
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user