"A. Pagaltzis" <[EMAIL PROTECTED]> writes:

>> Something like ++ instead of --.
>
> I think thatʼs ugly. Iʼd suggest simply addding another dash [...]

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

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.

Now, I could have forced this in the "-"-style command line look:

   mycmd --command=init --db=$HOME/mydb
   mycmd --command=load --db=$HOME/mydb data1 
   mycmd --command=load --trace --db=$HOME/mydb data1 
   mycmd --trace --command=load --db=$HOME/mydb data1 

but besides requiring more typing, it looses the distinction that
--command and --db are not options in the common sense. --db is not an
option, it's mandatory. And the (sub)command selection controls which
(real command line) options are further recognized.

So if you want something different, why not do it differently?

-- Johan

Reply via email to