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

Re: Question about _complete_help



Andrej Borsenkow wrote:

> I noted some difference between doc and actual output. Doc states:
> 
> The completion system represents such a context as a hierarchical name
> with components separated by colons. For example the name
> :complete:dvips:-o-1 is used when completing the first argument of the
> -o option of the dvips command.

Then your doc is out-of-date. At least mine says `:complete::dvips::-o-1'
and that ever since I made the command name be surrounded by double
colons, as you observed looking at the output of _complete_help:

> where actual output of _complete_help gives:
> 
> bor@itsrm2:~%> dvips -o ^Xh
> tags in context `:complete::dvips::-o-1':
>     arguments
>     globbed-files directories all-files
> 
> Are these double colons significant? This is really misleading. Note that for
> the command position:
> 
> bor@itsrm2:~%>
> tags in context `:complete:-command-':
>     commands executables jobs builtins functions aliases reserved-words
>     jobs
> 
> these double colons do not appear.

That's right. The double colons are *only* used around command names,
to make it very easy to unambiguously match it. See 8777 for further
enlightenment (and the up-to-date version of the docs, where I
mentioned this explicitly).


Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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