* Johan Vromans <[EMAIL PROTECTED]> [2005-06-19 11:15]:
> I find it very interesting to note that although we're talking
> about quite different semantics, everyone seems to be wanting
> to stick to the ancient syntax of "-"-style command line
> options.

I don’t see why it is “ancient” instead of “sensible.” You mean
that you think it’s not a good fit for this particular case; and
I’ve already said at least twice that the exemplified command
line interface to Eric’s hypothetical shopping tool is atrocious.

> It's like wanting to have a shell window on Windows/XP, and
> then control GUI applications from the command line. Nobody
> would want that.

Nobody…? What you say would actually be very useful to be able to
do.

> I have several tools that take different syntax on the command line,
> specific for the task. For example, subcommands:
> 
>    mycmd init db=$HOME/mydb
>    mycmd load db=$HOME/mydb data1 
>    mycmd load --trace db=$HOME/mydb data1 
>    mycmd --trace load db=$HOME/mydb data1 
> 
> Note that the 3rd and 4th commands behave significantly different.

This works fine so long as the non-option arguments have fixed
positions or your command line does not deal with files.

Several of my scripts use that style, as appropriate.

Regards,
-- 
#Aristotle
*AUTOLOAD=*_=sub{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1};
&Just->another->Perl->hacker;

Reply via email to