Re: Console_Getopt and 'ambiguous' options

From: Date: Fri, 04 Nov 2005 15:51:58 +0000
Subject: Re: Console_Getopt and 'ambiguous' options
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-21779@lists.php.net to get a copy of this message
On 11/4/05, Greg Beaver <cellog@php.net> wrote: > > Recently we extended the functionality of one of our scripts, and we > > started getting these error messages about being ambiguous: > > Error: Console_Getopt: option --type is ambiguous. > > > > What's the reson for this (shortcoming)? (AFAIK this limits the > > options to 26 [english]) > > don't forget digits ;) My bad! ;) > Seriously though, perhaps your project might benefit from the use of > another model, such as the command pattern used by PEAR itself. > > The reason short options must be a single character is because it is > possible to do: > > command -asdfieo > > This works exactly like: > > command -a -s -d -f -i -e -o > Fair point Greg, however most of our options must have a value, and using the long options makes the command line almost english, so we'd like to stick with the long options. :) Thanks! /Jocke

« previous php.pear.general (#21779) next »