[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-107-g92f790d
Ville Skyttä
ville.skytta at iki.fi
Fri Apr 22 09:24:39 UTC 2011
The following commit has been merged in the master branch:
commit 92f790d345e7f7f314644a5527a45e9064e00601
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Fri Apr 22 11:42:17 2011 +0300
rsync completion improvements.
Turn off nospace where appropriate, add some file and dir option completions.
diff --git a/CHANGES b/CHANGES
index 7980da4..321e4f8 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,7 +2,7 @@ bash-completion (2.x)
[ Ville Skyttä ]
* Add pxz and reptyr completions.
- * Improve aspell, gendiff, smartctl, tar, xz, and xzdec completions.
+ * Improve aspell, gendiff, rsync, smartctl, tar, xz, and xzdec completions.
* Try harder to find the correct perl executable to run the perl helper with.
* Drop rpm query support for rpm < 4.1.
* Split rpm and rpmbuild completions and improve them both.
diff --git a/completions/rsync b/completions/rsync
index 5c07db4..d1eb3ae 100644
--- a/completions/rsync
+++ b/completions/rsync
@@ -12,19 +12,25 @@ _rsync()
_expand || return 0
case $prev in
- --config|--password-file|--include-from|--exclude-from)
+ --config|--password-file|--include-from|--exclude-from|--files-from|\
+ --log-file|--write-batch|--only-write-batch|--read-batch)
+ compopt +o nospace
_filedir
return 0
;;
- -T|--temp-dir|--compare-dest)
+ -T|--temp-dir|--compare-dest|--backup-dir|--partial-dir|--copy-dest|\
+ --link-dest)
+ compopt +o nospace
_filedir -d
return 0
;;
-e|--rsh)
+ compopt +o nospace
COMPREPLY=( $( compgen -W 'rsh ssh' -- "$cur" ) )
return 0
;;
--compress-level)
+ compopt +o nospace
COMPREPLY=( $( compgen -W '1 2 3 4 5 6 7 8 9' -- "$cur" ) )
return 0
;;
@@ -34,7 +40,7 @@ _rsync()
-*)
COMPREPLY=( $( compgen -W '--verbose --quiet --no-motd --checksum \
--archive --recursive --relative --no-implied-dirs \
- --backup --backup-dir --suffix= --update --inplace --append \
+ --backup --backup-dir= --suffix= --update --inplace --append \
--append-verify --dirs --old-dirs --links --copy-links \
--copy-unsafe-links --safe-links --copy-dirlinks \
--keep-dirlinks --hard-links --perms --executability --chmod= \
@@ -59,6 +65,8 @@ _rsync()
--write-batch= --only-write-batch= --read-batch= --protocol= \
--iconv= --ipv4 --ipv6 --version --help --daemon --config= \
--no-detach' -- "$cur" ) )
+ [[ ${#COMPREPLY[@]} -eq 1 && ${COMPREPLY[0]} != *= ]] && \
+ compopt +o nospace
;;
*:*)
if type _scp_remote_files &>/dev/null; then
--
bash-completion
More information about the Bash-completion-commits
mailing list