thoughts on options and commands

Frank Tobin
Sun Apr 22 06:29:01 2001

Hash: SHA1

I've been thinking about the difference between options and commands, and
how one is supposed to arrange them on the command line.

Currently, the layout is:

  gpg options command arguments

I think this layout is not very friendly.  Generally, a user naturally
thinks to layout more in terms of how cvs does it.

  cvs global-options command command-options arguments

There is an analogy between cvs and gnupg's interface; each one is a sort
of 'meta-interface', with sub-commands.  E.g., cvs has "update" and
"commit", while gnupg has "encrypt" and "sign".  Each one has "global"
options which apply to each command: cvs has "-d" (the cvsroot), and gnupg
has "--homedir".  Each one has command-specific optoins, such as
"cvs update -A", and "gpg -r recipient --encrypt".

Given this analogy, I think that cvs's approach is better.  It certainly
is more "intuitive" (dare I use that word?), I feel.  Consider this:
a user does not say "I want the recipient to be Bob, and I want to
encrypt".  No, rather, a user thinks "I want to encrypt, with the
recipient being Bob".  Hence, the command-line should be layed out like:

  gpg encrypt -r Bob

As a side benefit, if GnuPG commands didn't have dashes in the front, like
cvs, there would be less confusion between the difference of the two (I
think many users don't understand the difference).

So, given this argument (no pun intended), I think that in the next major
release of GnuPG, the command-line interface should be revamped to be more
like cvs's.

- -- 
Frank Tobin
Version: GnuPG v1.0.4 (FreeBSD)
Comment: pgpenvelope 2.10.0 -