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

Re: PATCH: complete rpm --{resign,addsign} in local



Bart Schaefer wrote:

> ...
> 
> I don't think it's incumbent upon _arguments to handle this without help;
> that's exactly what the state machine is for.  It just has to be possible
> to tell _arguments that other option letters are allowed in the string of
> options even after one that has a following argument, so that it can go
> to the right next state.

Yep. Good.

> This could be done by something like `_arguments -s+ ...' if it's too
> awful to come up with still more OPTSPEC syntax (which I'm beginning to
> believe that it is).

I'll have a look...

> ...
> 
> Of course the compadd in _rpm needs a `-S ""' added to it.  Which reminds
> me ... I tried changing that compadd to be:
> 
> 	_alternative ... 'prefixes:URL prefix:compadd \ ftp://'
> 
> to try to force a leading space onto the command line, but what got put
> on the command line *included* the backslash.  What's up with that?  It
> works to put a backslashed space in the pattern for '_files -g ...'.

_path_files does it's own quoting. With compadd you get the usual
normalised quoted form. You can use -P ' ' or -i ' ' to prepend the
unquoted space, but of course, you'll then get one space per
completion attempt because following completions can't know that the
space came from a previous completion.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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