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

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



Bart Schaefer wrote:

> On Jun 4,  5:09pm, Clint Adams wrote:
> } Subject: Re: PATCH: complete rpm --{resign,addsign} in local
> }
> } > Index: Completion/Linux/_rpm
> } 
> } zsh is still completing filenames directly after rpm -qcp or -qpc,
> } with no space, FWIW.
> 
> This is problematic.
> 
> Currently _rpm uses `-p+' as the spec for the -p option.  That means that
> anything that will follow the -p (including package file name) is allowed
> to appear in the same word, or in the next word.
> 
> If we remove the `+', then "rpm -qpc" doesn't match the spec `-p', and so
> completion doesn't enter the `package_file' state -- it instead enters the
> `package_or_file' state (the default spec from the `query' state).
> 
> If there's a clever workaround for this, I don't know it.  (Perhaps this
> is an indication of some lingering bugginess with `_arguments -s'?)

Hrm. So we have to make it complete option arguments in the next
word(s) even if the option string doesn't end in the option, right?

What makes me cringe is the case where we have -xy and both options
have arguments...

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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