diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2010-02-12 17:52:56 +0200 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2010-02-12 17:52:56 +0200 |
commit | 72a8cb5b49ad222e74f1d97ad10f85e3a002cf38 (patch) | |
tree | 3fce57e24d29188a0ab431158c69913308ce0cd2 | |
parent | 99e550c3a888a0d4e42c43224ff2e63e8538e2cb (diff) | |
download | bash-completion-72a8cb5b49ad222e74f1d97ad10f85e3a002cf38.tar.gz |
Add -H, -L, and -P to chown and chgrp option completions with -R/--recursive.
-rw-r--r-- | CHANGES | 7 | ||||
-rw-r--r-- | bash_completion | 12 |
2 files changed, 14 insertions, 5 deletions
@@ -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. diff --git a/bash_completion b/bash_completion index 904a8be2..4da6689e 100644 --- a/bash_completion +++ b/bash_completion @@ -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 |