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

Re: PATCH: Re: _arguments questions



>>> "Sven" == Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> writes:

 Sven> Alexandre Duret-Lutz wrote:

[...]

 >> _arguments -a -b '-c:*::::blah: _arguments -c -d -e'
 >> 
 >> Horrible !

 Sven> Because of that (;-) and because it isn't quite the same (but I
 Sven> confess, I had the same idea...). Especially, adding this dummy
 Sven> element might be useful to combine with both `::' and `:::'.

An helper function ?

  _with_dummy_arg0 () {  #  I'm not good at finding names...
       words=(dummy $words)
       (( ++CURRENT ))
       $@
  }

  _arguments -a -b '-c:*::blah: _with_dummy_arg0 _arguments -c -d -e'

Quite ugly, but looks understandable.  But taht way we can't get
the 'parent' option (-c) for the dummy as you suggested.

[...]

-- 
Alexandre Duret-Lutz



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