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

Re: flex -<TAB>



Alexandre Duret-Lutz wrote:

> >>> "Tanaka" == Tanaka Akira <akr@xxxxxxxxxxx> writes:
> 
>  Tanaka> Z(2):akr@is27e1u11% Src/zsh -f
>  Tanaka> is27e1u11% bindkey -e; autoload -U compinit; compinit -D; compdef _tst tst
>  Tanaka> is27e1u11% flex -<TAB>
>  Tanaka> -  -- generate C++ scanner class
>  Tanaka> -7 -- generate 7-bit scanner
>  Tanaka> ...
> 
>  Tanaka> The option `+' isn't displayed.
> 
> I think this is since 9216. The character just after `-' in an argument
> definition was not checked before, but now it is.  And since `+' has a
> special meaning for _arguments, perhaps the cleaner way to correct this is
> to escape it.

I think we better document this.

Bye
 Sven

diff -ru ../z.old/Doc/Zsh/compsys.yo Doc/Zsh/compsys.yo
--- ../z.old/Doc/Zsh/compsys.yo	Fri Feb  4 09:53:48 2000
+++ Doc/Zsh/compsys.yo	Fri Feb  4 10:42:17 2000
@@ -2084,7 +2084,10 @@
 and no other argument specification may be given after it.
 
 In the simplest form the var(opt-spec) is just the option name
-beginning with a minus or a plus sign, such as `tt(-foo)'. In this
+beginning with a minus or a plus sign, such as `tt(-foo)'. If the
+command accepts the option both with a leading minus and a plus sign,
+one can use either tt(-+foo) or tt(+-foo) to define both options at
+once. In this
 case, the first argument for the option (if any) has to come as a
 separate word directly after the option and the option may appear only 
 once on the line (and if it is already on the line, the option name
@@ -2097,6 +2100,10 @@
 instead. If the argument may be given as the next string or in same
 string as the option name but separated from it by an equal sign, a
 `tt(=)' should be used instead of the minus or plus sign.
+
+Note that this and the shortcut syntax with a leading tt(-+) or tt(+-) 
+means that for options like tt(-+) the second character has to be
+quoted with a backslash.
 
 If the option may be given more than once, a star
 (`tt(*)') has to be added in front of the var(opt-spec).

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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