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

Re: Redirection completion



Aargh, forgot to send this to the list again.

Sven Wischnowsky wrote:
> (should I
> also include the change to make compdef() use _comp_assocs? saving you
> some time?)

You might as well, it's certainly less than urgent and you might notice
something I wouldn't.

Oliver wrote:
>> Along the lines of
>>   :completion::complete:dvips:option-o-1:
>> I would suggest
>>   :completion::complete:echo:redir-2>:'
>> for `echo 2>'.
>
> The context isn't too useful for values either. I'm not sure about
> putting the information in the fifth (argument) part of the context.
> For values the fourth (command) part is just set to -value-. What I
> would suggest is that we use the fourth part of the context.
>...
>
>:completion::complete:-redirect-echo-2>:
>:completion::complete:-value-GZIP:

I don't understand the reasoning:  why does this need to be different
from the way options or arguments work?  For redirection it would seem
to be a similar sort of case, where you might want to match on the
command name in the normal way.  Values certainly demand different
handling.  But then surely the logical thing is to keep the type
separate from the argument and have

:completion::complete:-value-:GZIP:

as the context?

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************



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