zsh-users
 help / color / mirror / code / Atom feed
* Equivalent of compctl -L with "new" completion system?
@ 2006-07-18 18:32 ` John Reese
  2006-07-18 19:30   ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: John Reese @ 2006-07-18 18:32 UTC (permalink / raw)
  To: Zsh Users

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

do for the old compctl-style completions?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Equivalent of compctl -L with "new" completion system?
  2006-07-18 18:32 ` Equivalent of compctl -L with "new" completion system? John Reese
@ 2006-07-18 19:30   ` Peter Stephenson
  2006-07-18 19:31     ` John Reese
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Stephenson @ 2006-07-18 19:30 UTC (permalink / raw)
  To: Zsh Users

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

-- 
Peter Stephenson <p.w.stephenson@ntlworld.com>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Equivalent of compctl -L with "new" completion system?
  2006-07-18 19:30   ` Peter Stephenson
@ 2006-07-18 19:31     ` John Reese
  0 siblings, 0 replies; 3+ messages in thread
From: John Reese @ 2006-07-18 19:31 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh Users

On 7/18/06, Peter Stephenson <p.w.stephenson@ntlworld.com> 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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-07-18 19:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <john.reese@gmail.com>
2006-07-18 18:32 ` Equivalent of compctl -L with "new" completion system? John Reese
2006-07-18 19:30   ` Peter Stephenson
2006-07-18 19:31     ` John Reese

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).