commandline syntax

Dave Dykstra dwd at lucent.com
Wed Apr 7 15:03:55 CEST 1999


On Apr 7,  9:58am, ANM wrote:
> >>>>> "wk" == Werner Koch <wk at isil.d.shuttle.de> writes:
> 
>  wk> Hi, someone raised the question, whether to change the
>  wk> commandline syntax, so that it is more like tar(1) or ps(1).  I
>  wk> have no POSIX specs so I can't decide whether this is a good
>  wk> idea. Recent versions of ps(1) etc give you a warning, that the
>  wk> use of - is depreciated.
> 
>  wk> Example of a new syntax:
> 
>  wk> $ gpg -v sign 0x12345678 instead of $ gpg -v --sign 0x12345678
> 
> [snip]
> 
>  wk> Comments?
> 
> I for one dislike this approach. It does take some getting used, (the
> --cmd), but it is the correct way. tar(1) is the way it is for
> historic reasons, and ps(1), well it just plain different on most
> systems, (hp/us != solaris != irix != aix != osf/1, and the linux
> version tries to be all things to all folks).


I agree that ps and tar are bad models.  The only reason that "-" is
deprecated on GNU ps, as the man page says, is so in the future they
can distinguish between System V style options and BSD style options.
Besides, you're not proposing removing the hyphens on the short
options, you're proposing removing the double-hyphen on the long options.

A better example perhaps is cvs, which has options and "commands".  Gpg
also makes that distinction, but commands all use the syntax of options.
It may make sense to remove the double-dash on just the long form of
commands.

- Dave Dykstra




More information about the Gnupg-devel mailing list