zsh-workers
 help / color / mirror / code / Atom feed
* Trying to improve completion for pgmkernel
@ 2007-10-01 17:49 Jesse W
  0 siblings, 0 replies; only message in thread
From: Jesse W @ 2007-10-01 17:49 UTC (permalink / raw)
  To: zsh-workers

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-10-01 17:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-01 17:49 Trying to improve completion for pgmkernel Jesse W

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