[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Here's the way I suggest the options really work

From: Greg Stein <gstein_at_lyra.org>
Date: 2000-10-15 05:18:25 CEST

On Sat, Oct 14, 2000 at 08:08:07PM -0700, Bruce Korb wrote:
>...
> > I will also warn you against using metacharacters as (short) option names.
>
> Interesting problem. The ``meta character'' options are automatically
> inserted.

Bleh. That's bogus :-)

This is the AutoOpt thing, right? Somebody should tell the author about his
poor choice on short forms :-)

> You always get --help and --more-help, period. If you
> specify a program version, then --version is added, too.

Not a problem. -h is typical for help. Maybe -H for more-help, but I'm also
okay with no short-form for that. -V is normal for --version.

> If you
> specify RC files, then you get --save-opts and --load-opts.

These are *really* weird. I've never seen a program like this. I'd be very
leery of these options (as a user). Does it merge? Replace? Why --load-opts
if it should always be reading the .rc file anyways?

IMO (as a user), they should go because they are hard to understand their
behavior.

> Now, given
> that people already like to use ``-v'' to mean ``--verbose'', what
> letters should I usurp for --help, --more-help, --save-opts and
> --load-opts? Remember, AutoOpts selects the letter, not the user.
> (Of course, if a client program chooses the same letter, then these
> automatic options loose the flag character.)

I'd say:

-v / --verbose
-V / --version
-h / --help
   / --more-help

Nuke --load-opts and --save-opts. Possibly nuke --more-help.

> > Bash is very good about metacharacters, but others aren't. I think you'll
> > also have problems with -> and -< on any shell. And don't say that people
> > should quote them :-)
>
> So, all in all, I think people should quote them. :-)

feh :-)

> The alphabet is small and the characters with special meaning
> to shell is large. Perhaps, since everyone uses QWERTY keyboards
> made for the US market, I could use the unshifted ``-<'' and
> ``->''? (For those that don't have U.S. keyboards, that would
> be ``-,'' and ``-.''. We would be talking seriously obscure. ;-)

The options themselves are obscure.

> So, maybe, all in all, people should just use the long options?

Personally, I like short forms. I'm typing the darn thing, after all.

Long forms are good when you have a bazillion options and you need to make
sure you aren't using the wrong one. e.g. "is -v for verbose or version?
damn. I'll just use --verbose" If Subversion has a bazillion options, then
I think that we've done something wrong :-)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
Received on Sat Oct 21 14:36:11 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.