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

Re: Redirection completion



 --- Peter Stephenson <pws@xxxxxxx> wrote:

> Next, it looks like the context for redirections isn't all that
> helpful
> at the moment.  After `echo 2>' I seem to get just
> `:completion::complete:echo::'.  Could we have something like the way
> arguments work, so that it at least indicates we're in a redirection,
> and preferably also the `2>' bit?  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. It is
currently defined as the command so it would make sense to use it as
the dispatch key. So we could have contexts which are something like:

:completion::complete:-redirect-echo-2>:
:completion::complete:-value-GZIP:

Exact format could be different. My point is about what component of
the context is used.

> _wanted logfiles expl 'log files' _path_files -g "*.log" && return 0
> _wanted all-files expl 'all files' _files

This looks like another example of why default tag-orders as I
described before would be a good idea.

Oliver

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com



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