Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Trying to improve completion for pgmkernel
- X-seq: zsh-workers 23890
- From: Jesse W <jessw@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Trying to improve completion for pgmkernel
- Date: Mon, 1 Oct 2007 10:49:23 -0700
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
I'm trying to improve the completion for the program pgmkernel, part of
netpbm, currently completed by the
Completion/Unix/Command/_pbm file.
Currently, the completion is:
_arguments '-weight:weight' ':width' ':height'
The usage for the program is:
usage: pgmkernel [-weight f] width [height]
A fix I know how to make (and tested it, and it works) is to stop the
-weight option from being completed after width or height is entered.
However, there are still problems. Specifically, when you type:
pgmkernel -
it tries to complete both the option (as it should) *and* width (as it
shouldn't) -- presumably because it doesn't know that width has to be a
positive integer. How can I tell it this? I looked for a regex type
of ACTION, but all I could find was the {EVAL-STRING} form and that
didn't seem like a good idea. I'm sure there's got to be a way to say
-- "this arguments accepts any positive integer", but I haven't found
it. Any suggestions?
Jesse Weinstein
Messages sorted by:
Reverse Date,
Date,
Thread,
Author