Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: Don't redefine helpers in _rsync() every time, -e takes cuddled args



---
 Completion/Unix/Command/_rsync |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/Completion/Unix/Command/_rsync b/Completion/Unix/Command/_rsync
index cdb40ab..bbdffef 100644
--- a/Completion/Unix/Command/_rsync
+++ b/Completion/Unix/Command/_rsync
@@ -96,6 +96,7 @@ _rsync_files() {
   _alternative "files:file:_files" "remote-files:remote file:_rsync_remote_files"
 }
 
+_rsync() {
 _arguments -s \
   '*'{-v,--verbose}'[increase verbosity]' \
   {--no-v,--no-verbose}'[turn off --verbose]' \
@@ -169,7 +170,7 @@ _arguments -s \
   {--no-W,--no-whole-file}'[turn off --whole-file]' \
   '(-x --one-file-system)'{-x,--one-file-system}'[do not cross filesystem boundaries]' \
   '(-B --block-size)'{-B,--block-size=}'[force a fixed checksum block-size]:block size' \
-  '(-e --rsh)'{-e,--rsh=}'[specify the remote shell to use]:remote-shell command:(rsh ssh)' \
+  '(-e --rsh)'{-e+,--rsh=}'[specify the remote shell to use]:remote-shell command:(rsh ssh)' \
   '--rsync-path=[specify path to rsync on the remote machine]:remote command' \
   '--ignore-existing[ignore files that already exist on receiving side]' \
   '(--existing --ignore-non-existing)'{--existing,--ignore-non-existing}'[ignore files that do not exist on receiving side]' \
@@ -237,3 +238,6 @@ _arguments -s \
   '--protocol=[force an older protocol version to be used]:number' \
   '--iconv=[request charset conversion of filenames]:number' \
   '--read-batch=[read a batched update from the specified file]:file:_files'
+}
+
+_rsync "$@"
-- 
1.7.5.4



Messages sorted by: Reverse Date, Date, Thread, Author