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

PATCH: _rsync improved



I reorderd some lines in the _rsync completion function to work around
a previously-reported problem with shorter options interfereing with
the completion of longer options.  [To remind folks what was wrong: the
options --include-from and --exclude-from were not completing files
after an '=' (though they would complete files if the '=' was removed)
because each had a shorter option (--include and --exclude) that also
ended with a '='.]

I just discovered that if I moved each longer option to come before
the associated shorter option, that file completion starts to work
properly.  At some point we'll probably want to debug this so that
the order is not significant.

..wayne..
--- _rsync	27 Apr 2005 08:22:34 -0000	1.24
+++ _rsync	29 Jul 2005 19:18:01 -0000
@@ -166,10 +166,10 @@ _arguments -s \
   '(-C --cvs-exclude)'{-C,--cvs-exclude}'[auto-ignore files the same way CVS does]' \
   '*'{-f,--filter=}'[add a file-filtering rule]:rule:' \
   '*-F[same as --filter="dir-merge /.rsync-filter", repeated: --filter="- .rsync-filter"]' \
-  '*--exclude=[exclude files matching pattern]:pattern:' \
   '--exclude-from=[read exclude patterns from specified file]:file:_files' \
-  '*--include=[do not exclude files matching pattern]:pattern:' \
+  '*--exclude=[exclude files matching pattern]:pattern:' \
   '--include-from=[read include patterns from specified file]:file:_files' \
+  '*--include=[do not exclude files matching pattern]:pattern:' \
   '--files-from=[read list of source-file names from specified file]:file:_files' \
   '(-0 --from0)'{-0,--from0}'[all *-from file lists are delimited by nulls]' \
   '--version[print version number]' \


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