From owner-cvs-all Fri Jun 25 0:33:36 1999 Delivered-To: cvs-all@freebsd.org Received: from hcsext.hcs.de (hcshh.hcs.de [194.123.40.1]) by hub.freebsd.org (Postfix) with SMTP id 7F4D715567; Fri, 25 Jun 1999 00:33:28 -0700 (PDT) (envelope-from hm@hcs.de) Received: from hcswork.hcs.de([192.76.124.5]) (3285 bytes) by hcsext.hcs.de via sendmail with P:smtp/R:inet_hosts/T:smtp (sender: ) id for ; Fri, 25 Jun 1999 09:32:55 +0200 (CEST) (Smail-3.2.0.104 1998-Nov-20 #1 built 1998-Dec-11) Received: by hcswork.hcs.de (Smail3.1.29.0 #12) id m10xQTn-0000dCC; Fri, 25 Jun 99 09:32 METDST Message-Id: From: hm@hcs.de (Hellmuth Michaelis) 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 In-Reply-To: <199906250720.BAA42199@harmony.village.org> from Warner Losh at "Jun 25, 99 01:20:12 am" To: imp@harmony.village.org (Warner Losh) Date: Fri, 25 Jun 1999 09:32:55 +0200 (METDST) Cc: hm@hcs.de, des@flood.ping.uio.no, bde@zeta.org.au, cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Reply-To: hm@hcs.de Organization: HCS Hanseatischer Computerservice GmbH X-Mailer: ELM [version 2.4ME+ PL39 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 2190 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk From the keyboard of Warner Losh: > In message 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