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

Re: Equivalent of compctl -L with "new" completion system?



On 7/18/06, Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx> wrote:
"John Reese" wrote:
> Is there a command or function that will (a) list all commands that
> have custom (zshcompsys) completions and indicate what they are, and
> (b) do the same, but only for a given command, like
>
> (a)  compctl -L
> and
> (b)  compctl -L svn

You can do

print -l ${(k)_comps}

to show the contexts for which there are completions.  This includes
both command names and special contexts such as
-value-,DISPLAY,-default-  (the value of the DISPLAY environment variable).

print ${_comps[svn]}

will show you if a given command is handled and if so by what function.

Neat.  Thanks.



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