Add -H, -L, and -P to chown and chgrp option completions with -R/--recursive.

This commit is contained in:
Ville Skyttä 2010-02-12 17:52:56 +02:00
parent 99e550c3a8
commit 72a8cb5b49
2 changed files with 14 additions and 5 deletions

View File

@ -25,9 +25,10 @@ bash-completion (2.x)
* Apply cardctl completion to pccardctl too.
* Apply pine completion to alpine too.
* Remove many unnecessary short option completions where long ones exist.
* Improve chsh, configure, cvs, gkrellm, gzip, lftp, look, make, mdadm,
modprobe, mplayer, mysqladmin, rsync, screen, service, scp, ssh, sshfs,
update-alternatives, vncviewer, yp-tools, and general hostname completions.
* Improve chsh, chgrp, chown, configure, cvs, gkrellm, gzip, lftp, look,
make, mdadm, modprobe, mplayer, mysqladmin, rsync, screen, service, scp,
ssh, sshfs, update-alternatives, vncviewer, yp-tools, and general hostname
completions.
* Add abook and wtf completion, based on work by Raphaël Droz.
* Add cvsps, dragon, fusermount, jarsigner, k3b, lftpget, pm-utils, rtcwake,
pack200, unpack200, pbzip2, pbunzip2, pbzcat, pigz and unpigz completions.

View File

@ -1084,9 +1084,13 @@ _chown()
if [[ "$cur" == -* ]]; then
# Complete -options
local w opts
for w in "${COMP_WORDS[@]}" ; do
[[ "$w" == -@(R|-recursive) ]] && opts="-H -L -P" && break
done
COMPREPLY=( $( compgen -W '-c -h -f -R -v --changes --dereference \
--no-dereference --from --silent --quiet --reference --recursive \
--verbose --help --version' -- "$cur" ) )
--verbose --help --version $opts' -- "$cur" ) )
else
local args
@ -1125,9 +1129,13 @@ _chgrp()
# options completion
if [[ "$cur" == -* ]]; then
local w opts
for w in "${COMP_WORDS[@]}" ; do
[[ "$w" == -@(R|-recursive) ]] && opts="-H -L -P" && break
done
COMPREPLY=( $( compgen -W '-c -h -f -R -v --changes --dereference \
--no-dereference --silent --quiet --reference --recursive \
--verbose --help --version' -- "$cur" ) )
--verbose --help --version $opts' -- "$cur" ) )
return 0
fi