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

Re: PATCH: Re: problem with _arguments



On Jul 27,  9:17am, Sven Wischnowsky wrote:
}
} The patch will make it show the message and the option, which is what
} should have been done before. If this is good or if it should only
} complete the option is a different question. Hm. Hm?

Recalling that the original spec was:

 - the function has one optional option '-l' with no parameter
 - the first parameter can't be completed
 - subsequent parameters are files

I think _arguments has done the right thing, because any string other than
"-l" might just be a first parameter that happens to begin with hyphen.

However, if the spec had been "the first parameter must not begin with a
hyphen but cannot be completed" then I don't know how to express that in
the current _arguments syntax without using a state machine, which seems
like overkill in this situation.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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