zsh-workers
 help / color / mirror / code / Atom feed
* New completion function: _zsh
@ 2008-09-24 15:46 Richard Hartmann
  2008-09-24 16:14 ` Frank Terbeck
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Hartmann @ 2008-09-24 15:46 UTC (permalink / raw)
  To: Zsh hackers list

Hi all,

I realized there is no completion function for zsh.

I am working on one which will at least show the command line
parameters, but I want to get some feedback on some questions, first.

1) What is the correct place to look up all parameters? zshoptions
lists a lot of options, but definitely not all of them. For example,
none of the long options like --version appear.


2) What is the preferred style for completions?

I can think of these:

-0[CORRECT: Try to correct the spelling of commands]
-0[Try to correct the spelling of commands (CORRECT)]
-0[Try to correct the spelling of commands]


3) Is doing this by hand a good idea or should it be auto-generated
from the docs?


Richard


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

* Re: New completion function: _zsh
  2008-09-24 15:46 New completion function: _zsh Richard Hartmann
@ 2008-09-24 16:14 ` Frank Terbeck
  2008-09-24 16:21   ` Mikael Magnusson
  0 siblings, 1 reply; 3+ messages in thread
From: Frank Terbeck @ 2008-09-24 16:14 UTC (permalink / raw)
  To: Zsh hackers list

Richard Hartmann <richih.mailinglist@gmail.com>:
> I realized there is no completion function for zsh.

Actually, zsh completion is handled by _sh.

[...]
> 2) What is the preferred style for completions?
> 
> I can think of these:
> 
> -0[CORRECT: Try to correct the spelling of commands]
> -0[Try to correct the spelling of commands (CORRECT)]
> -0[Try to correct the spelling of commands]
[...]

Aesthetically, I'd prefer the 2nd idea.

Regards, Frank

-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925


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

* Re: New completion function: _zsh
  2008-09-24 16:14 ` Frank Terbeck
@ 2008-09-24 16:21   ` Mikael Magnusson
  0 siblings, 0 replies; 3+ messages in thread
From: Mikael Magnusson @ 2008-09-24 16:21 UTC (permalink / raw)
  To: Zsh hackers list

2008/9/24 Frank Terbeck <ft@bewatermyfriend.org>:
> Richard Hartmann <richih.mailinglist@gmail.com>:
>> I realized there is no completion function for zsh.
>
> Actually, zsh completion is handled by _sh.
>
> [...]
>> 2) What is the preferred style for completions?
>>
>> I can think of these:
>>
>> -0[CORRECT: Try to correct the spelling of commands]
>> -0[Try to correct the spelling of commands (CORRECT)]
>> -0[Try to correct the spelling of commands]
> [...]
>
> Aesthetically, I'd prefer the 2nd idea.
>
> Regards, Frank

_gnu_generic also handles it pretty well, though it's not very informative.
% zsh -<tab>
---- option
-0                        -- equivalent to --completeinword
-1                        -- equivalent to --printexitvalue
-2                        -- equivalent to --no-badpattern
.
.
.
-Y                        -- equivalent to --menucomplete
-Z                        -- equivalent to --zle
--aliases               --cshjunkiequotes       --hup
 --privileged
--allexport             --cshnullcmd            --ignorebraces
 --promptbang


-- 
Mikael Magnusson


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

end of thread, other threads:[~2008-09-24 16:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-24 15:46 New completion function: _zsh Richard Hartmann
2008-09-24 16:14 ` Frank Terbeck
2008-09-24 16:21   ` Mikael Magnusson

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