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

Re: characters not added in _rsync completion



On Tue, 12 Oct 2004, Wayne Davison wrote:

> zsh sometimes fails to add all the common characters that it should
> when completing an ambiguous option.
[...]
> (Note that two of those require a very recent rsync that has the
> --checksum-seed and --partial-dir options, otherwise there would
> be only one option to complete.)

I'm puzzled why the version of rsync itself makes any difference, because 
_rsync specifies everything explicitly, so unless you've edited _rsync it 
won't ever complete those options.  Does Debian come with an updated 
_rsync for which a patch has not been posted back to zsh-workers?

Similarly, I have only --links and nothing else that matches --link.
However, I can reproduce this for several of the others that you list:

> rsync --com<TAB>   # should add "p"
> rsync --par<TAB>   # should add "tial"
> rsync --ti<TAB>    # should add "me"

Yet this one works for me:

> rsync --no<TAB>    # should add "-"

(That is, I do get "-" added when completing there.)

> Would anyone care to look into this?

Without plunging into the why of it, a cursory inspection seems to 
indicate that when an option has an argument (e.g., --compa completes to 
--compare-dest= with the trailing equal sign) then zsh fails to find the 
longest common prefix among that option and any other options that do NOT 
have arguments (as --compress does not).  All the cases that fail appear 
to have at least one option with, and at least one without, an argument.



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