Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jun 1999 09:32:55 +0200 (METDST)
From:      hm@hcs.de (Hellmuth Michaelis)
To:        imp@harmony.village.org (Warner Losh)
Cc:        hm@hcs.de, des@flood.ping.uio.no, bde@zeta.org.au, cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org
Subject:   Re: cvs commit: src/usr.sbin/i4b/isdnd main.c src/usr.sbin/i4b/isdndebug main.c src/usr.sbin/i4b/isdndecode main.c src/usr.s
Message-ID:  <m10xQTn-0000dCC@hcswork.hcs.de>
In-Reply-To: <199906250720.BAA42199@harmony.village.org> from Warner Losh at "Jun 25, 99 01:20:12 am"

next in thread | previous in thread | raw e-mail | index | archive | help
From the keyboard of Warner Losh:
> In message <m10xQDk-0000fqC@hcswork.hcs.de> Hellmuth Michaelis writes:
> : This is true, but we're talking about a fundamental feature of every
> : interactive program - getting basic help (and no, not man prog .. ;-) ).
> : 
> : IMHO, the flag which is used to get help should not bring an error message
> : back to the user.
> 
> Even when the user used an illegal option to get the help? 

No.

Currently i use -? in all my programs to get a usage message without
an error message. A character not contained in the option string also
gives a usage message and an error message.

I think that:

 - a commonly accepted and globally documented flag character should
   give a short usage message without an error.

 - a character not contained in the option string should give a short
   usage message and an error message.

And yes, i know that this is nitpicking, but perhaps we can get a common
(FreeBSD-) way of option handling and so a better and more consistent
user interface.


> : > I personally think encouraging -? is dangerous given its potential
> : > danger, as others have pointed out
> : 
> : Good. I can accept that and switch to using another flag for getting
> : help - BUT i think also that FreeBSD should use this flag consistently
> : for all or most of the programs and it should be documented in a well
> : known and easy to find place.
> : 
> : What should the help flag character be ?
> 
> I don't know.  One thing that you can do is start your option string
> with :, so no errors happen.  Another is to set opterr to 0.
> 
> Since I don't have a good answer, I'm thinking of just backing out all 
> the ? changes I've made (except for pkg, which others are working on).

Hmm - i would prefer to get something consistent and from now on well
documented out of this discussion before backing out something.

hellmuth
-- 
Hellmuth Michaelis                                    Tel   +49 40 559747-70
HCS Hanseatischer Computerservice GmbH                Fax   +49 40 559747-77
Oldesloer Strasse 97-99                               Mail  hm [at] hcs.de
22457 Hamburg                                         WWW   http://www.hcs.de


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m10xQTn-0000dCC>