Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: _rsync duplicated options in completion
- X-seq: zsh-workers 17183
- From: Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: _rsync duplicated options in completion
- Date: Sat, 18 May 2002 09:46:51 -0700 (PDT)
- Cc: Zsh Workers <zsh-workers@xxxxxxxxxx>
- In-reply-to: <1020516171040.ZM19537@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
On Thu, 16 May 2002, Bart Schaefer wrote:
> The problem is that the `--' argument to _arguments is causing the
> output from `rsync --help' to be merged with the long list of options
> provided in the completion function itself. Instead of recognizing
> that there are overlaps, every option is being presented twice.
I've discovered that the problem stems from the rsync options containing
"--foo=BAR" items (such as --ignore=FILE and --include=PATTERN) while
the options in the _rsync file only say "--foo=". If I add a sed
command to the end of the command that invokes --help, the end of the
line looks like this:
... --help 2>&1|sed 's/\(--[-A-Za-z_]*=\)[-A-Za-z_]*/\1/')//\[--/
This makes the duplicated-option bug goes away. Someone may want to
translate that into a zsh expansion pattern to avoid the call to sed.
OR, we may want to add the ability to specify an option like
"--include=PATTERN" in the _rsync file and have the PATTERN part only
show up as part of the help text, but not be included when completing
the option name.
..wayne..
Messages sorted by:
Reverse Date,
Date,
Thread,
Author