* invisible option completions?
@ 2004-06-01 1:40 Jason McCarty
2004-06-02 15:31 ` Oliver Kiddle
0 siblings, 1 reply; 3+ messages in thread
From: Jason McCarty @ 2004-06-01 1:40 UTC (permalink / raw)
To: zsh-workers
Is it possible with _arguments or some other way to have options that
can be completed, but aren't displayed on the screen as possible
completions? I'd like something like
_arguments \
'(-o)--output[save output in DIR]:DIR:_files -/' \
'(--output)-o:DIR:_files -/'
but where -o doesn't clutter the screen. I know that zsh 4.2 would
display -o nicely beside --output if I gave it the same explanation, but
I'd like to support 4.0 as well. Any suggestions?
--
Jason McCarty <bclg@iup.edu>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: invisible option completions?
2004-06-01 1:40 invisible option completions? Jason McCarty
@ 2004-06-02 15:31 ` Oliver Kiddle
2004-06-02 21:00 ` [resolved] " Jason McCarty
0 siblings, 1 reply; 3+ messages in thread
From: Oliver Kiddle @ 2004-06-02 15:31 UTC (permalink / raw)
To: Jason McCarty; +Cc: zsh-workers
Jason McCarty wrote:
> Is it possible with _arguments or some other way to have options that
> can be completed, but aren't displayed on the screen as possible
> completions? I'd like something like
> _arguments \
> '(-o)--output[save output in DIR]:DIR:_files -/' \
> '(--output)-o:DIR:_files -/'
> but where -o doesn't clutter the screen. I know that zsh 4.2 would
> display -o nicely beside --output if I gave it the same explanation, but
> I'd like to support 4.0 as well. Any suggestions?
If you put an exclamation mark before the option description, it won't
be displayed (or completed) but it will still handle the argument:
'!(--output)-o:DIR:_files -/'
If you want the options to actually be completed too (such as if you
are hiding long option names), then use compadd with the `-n' option.
This won't hide them from menu-selection:
compadd -n -- -o
Oliver
^ permalink raw reply [flat|nested] 3+ messages in thread
* [resolved] invisible option completions?
2004-06-02 15:31 ` Oliver Kiddle
@ 2004-06-02 21:00 ` Jason McCarty
0 siblings, 0 replies; 3+ messages in thread
From: Jason McCarty @ 2004-06-02 21:00 UTC (permalink / raw)
To: zsh-workers
Oliver Kiddle wrote:
> If you put an exclamation mark before the option description, it won't
> be displayed (or completed) but it will still handle the argument:
> '!(--output)-o:DIR:_files -/'
That's exactly what I was looking for, thanks!
--
Jason McCarty <bclg@iup.edu>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-06-02 23:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-01 1:40 invisible option completions? Jason McCarty
2004-06-02 15:31 ` Oliver Kiddle
2004-06-02 21:00 ` [resolved] " Jason McCarty
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).