Re: Re: Console_Getopt and 'ambiguous' options

From: Date: Mon, 07 Nov 2005 09:58:25 +0000
Subject: Re: Re: Console_Getopt and 'ambiguous' options
References: 1 2 3 4  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-21824@lists.php.net to get a copy of this message
Bonjour Bertrand, On 11/4/05, bertrand Gugger <bertrand@toggg.com> wrote: > >On 11/4/05, Greg Beaver <cellog@php.net> wrote: > >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. :) Bertrand, thanks for your reply - however you've confused me even more :) > Perhaps I don't get it right, > but the long options are designed in such a way that you only need an > anambiguous start to specify them. > Say , if you defined --option, then input --opt could be enough to get it.. Why would I define "--option" and then allow for "--opt" to be used - I'm dealing with computers and I'd like them to do what I tell them to - not think for me... :) > But then, the input must be sufficient to differentiate it. Can you elaborate on this please..? > Say you defined --opt1 and --opt2 > then, you get this error message if input is done using --opt because > then --opt is ambiguous as cannot assert if it's --opt1 or --opt2. But why would the system not be able to differentiate between "--opt1" and "--opt2" - surely the system can tell that these are not the same strings..? > (input --o or --op would be ambiguous the same) I kind of get the short options having to be of different letters as you can "stick them together" as in "-oadsgbx" is the same as "-o -a -d -s -g -b -x", but I don't think the same should apply to long options. > That's the onliest case where this message is issued, > and you *may* use long options starting with the same letters. How do I use long options starting with the same letters. I'd like to use something along (name/values have been changed to protect the coders ;) ): "--type_id=12 --type_name=Stuff --type_process=complete --thing_id=32 --thing_name=Thingiemajig --address=123566" How can I do this? > Sorry for my crap english. Far better than my French! :) Merci! /Jocke

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