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

Re: Redirection completion



Sven Wischnowsky wrote:
> The functions calling _dispatch give it a bunch of string that are to
> be looked up in order until one with a defined function is found.
> And, in this case, _redirect makes sure to give first `-redirect-echo-2>', 
> then `-redirect-2>'.  So you can define a special version for echo and
> another one for completion after `2>' everywhere else.  _dispatch adds
> to this the context `-default-' preceded by the prefix it was given,
> so default redirection completion is defined by `-redirect--default-',
> which is what is now in _files.

Sorry, I didn't make my question clear.  I understand how it looks for
what to execute to find completions (though I wouldn't have guessed
about `-redirect--default-' without looking at the code, although that's
logical).  My question was, when I get where I'm going and try
completion, what context is seen by styles?  What I'm worring about is
if I'm in some generic form of redirection completion I can still check
for `-redirect-echo-2>' in pattern-files, or does the context still just look
like `-redirect-2>' or `-redirect--default-'?

-- 
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