From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5944 invoked from network); 18 May 2002 16:47:07 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 18 May 2002 16:47:07 -0000 Received: (qmail 24955 invoked by alias); 18 May 2002 16:46:56 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 17183 Received: (qmail 24943 invoked from network); 18 May 2002 16:46:55 -0000 Date: Sat, 18 May 2002 09:46:51 -0700 (PDT) From: Wayne Davison To: Bart Schaefer Cc: Zsh Workers Subject: Re: _rsync duplicated options in completion In-Reply-To: <1020516171040.ZM19537@candle.brasslantern.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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..