[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 72a8cb5b49ad222e74f1d97ad10f85e3a002cf38
Ville Skyttä
ville.skytta at iki.fi
Fri Feb 12 15:54:21 UTC 2010
The following commit has been merged in the master branch:
commit 72a8cb5b49ad222e74f1d97ad10f85e3a002cf38
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Fri Feb 12 17:52:56 2010 +0200
Add -H, -L, and -P to chown and chgrp option completions with -R/--recursive.
diff --git a/CHANGES b/CHANGES
index db5ef76..bfa254f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -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 904a8be..4da6689 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
--
bash-completion
More information about the Bash-completion-commits
mailing list