Add compgen completion.
This commit is contained in:
parent
806bc113de
commit
45668c23d3
3
CHANGES
3
CHANGES
@ -8,7 +8,8 @@ bash-completion (2.x)
|
||||
|
||||
[ Ville Skyttä ]
|
||||
* Activate hping2 completion also for hping and hping3.
|
||||
* Add crontab, iftop, lrzip, POSIX sh, xmodmap, and xrdb completions.
|
||||
* Add compgen, crontab, iftop, lrzip, POSIX sh, xmodmap, and xrdb
|
||||
completions.
|
||||
* Add *.gif (Alioth: #312512), *.3gpp, *.3gpp2, and *.awb to mplayer
|
||||
filename completions.
|
||||
* Add "short" tarball extensions to unxz, unlzma etc completions.
|
||||
|
@ -110,13 +110,14 @@ _complete()
|
||||
|
||||
if [[ "$cur" == -* ]]; then
|
||||
# relevant options completion
|
||||
COMPREPLY=( $( compgen -W '-a -b -c -d -e -f -g -j -k -o -s -v -u -A \
|
||||
-G -W -P -S -X -F -C' -- "$cur" ) )
|
||||
local opts="-a -b -c -d -e -f -g -j -k -o -s -u -v -A -G -W -P -S -X"
|
||||
[[ $1 != compgen ]] && opts="$opts -F -C"
|
||||
COMPREPLY=( $( compgen -W "$opts" -- "$cur" ) )
|
||||
else
|
||||
COMPREPLY=( $( compgen -A command -- "$cur" ) )
|
||||
fi
|
||||
}
|
||||
complete -F _complete complete
|
||||
complete -F _complete compgen complete
|
||||
|
||||
# Local variables:
|
||||
# mode: shell-script
|
||||
|
Loading…
x
Reference in New Issue
Block a user