From owner-cvs-src@FreeBSD.ORG Wed Jun 4 11:48:33 2008 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D9621065684; Wed, 4 Jun 2008 11:48:33 +0000 (UTC) (envelope-from cokane@FreeBSD.org) Received: from hrndva-omtalb.mail.rr.com (hrndva-omtalb.mail.rr.com [71.74.56.125]) by mx1.freebsd.org (Postfix) with ESMTP id DAC6D8FC23; Wed, 4 Jun 2008 11:48:32 +0000 (UTC) (envelope-from cokane@FreeBSD.org) Received: from orion.intree.net ([70.62.16.218]) by hrndva-omta04.mail.rr.com with ESMTP id <20080604114832.MSMN2027.hrndva-omta04.mail.rr.com@orion.intree.net>; Wed, 4 Jun 2008 11:48:32 +0000 Received: from mail.cokane.org (unknown [172.31.0.6]) by orion.intree.net (Postfix) with ESMTP id C21D6361C3F6; Wed, 4 Jun 2008 07:48:31 -0400 (EDT) Received: by mail.cokane.org (Postfix, from userid 103) id 797AB1DB2FA; Wed, 4 Jun 2008 07:48:31 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.1.8-gr1 (2007-02-13) on discordia X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.8-gr1 Received: from [172.20.1.3] (erwin.int.cokane.org [172.20.1.3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.cokane.org (Postfix) with ESMTP id 368871DB2F9; Wed, 4 Jun 2008 07:48:16 -0400 (EDT) From: Coleman Kane To: Alexey Dokuchaev In-Reply-To: <20080604041815.GA84027@FreeBSD.org> References: <200805301426.m4UEQ92d025434@repoman.freebsd.org> <48405C4B.3050603@FreeBSD.org> <1212179252.1967.1.camel@localhost> <20080604041815.GA84027@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-SIbfHldnnsoD03ouw5zp" Organization: FreeBSD Project Date: Wed, 04 Jun 2008 07:46:52 -0400 Message-Id: <1212580012.15220.58.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.1.1 FreeBSD GNOME Team Port Cc: Maxim Sobolev , src-committers@freebsd.org, cvs-all@freebsd.org, Florent Thoumie , cvs-src@freebsd.org Subject: Re: cvs commit: src/usr.sbin/pkg_install/add main.c pkg_add.1 src/usr.sbin/pkg_install/create main.c pkg_create.1 src/usr.sbin/pkg_install/delete main.c pkg_delete.1 src/usr.sbin/pkg_install/info main.c pkg_info.1 ... X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Jun 2008 11:48:33 -0000 --=-SIbfHldnnsoD03ouw5zp Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed, 2008-06-04 at 04:18 +0000, Alexey Dokuchaev wrote: > On Tue, Jun 03, 2008 at 04:18:23PM +0100, Florent Thoumie wrote: > > On Fri, May 30, 2008 at 9:27 PM, Coleman Kane wrot= e: > > > On Fri, 2008-05-30 at 12:58 -0700, Maxim Sobolev wrote: > > >> I am curious what is our policy on using long options in the base sy= stem > > >> (if any)? I believe that pkg_install is the first non-contributed ba= se > > >> system utility to actually widely use it. For some reason I've got > > >> impression that use of getopt_long is considered "the Linux/GNU way"= , > > >> this API provided for compatibility purposes and its use in base sys= tem > > >> is discouraged. Quick grep through /use/src seemingly supports that. > > >> > > >> Can someone confirm/reject? > > > > > > I am not sure about policy, however I do appreciate the long options > > > sometimes. Primarily, I think they are useful (in a self-documenting > > > way) for use in shell scripts. I tend to prefer the single-char optio= ns > > > when I am doing the administration myself. > >=20 > > I'm not aware of such policy. > >=20 > > I think they're useful because as far as pkg_install is concerned, we > > are using single-char options that are hard to match to the action > > it's doing. Here are a couple examples: > >=20 > > - pkg_create -h doesn't call usage() because it's already taken. > > - it's easy to confuse pkg_info -o and pkg_info -O. > >=20 > > I'll back it out if general consensus is that long options should be av= oided. >=20 > I'd rather avoid long options in *BSD utilities. They're hard to > remember, easy to confuse, while not really gaining us anything useful > (IMHO of course). >=20 > ./danfe >=20 Short options aren't going away, nor should they. So if you can't remember them, then you can rest assured that you won't have to. --=20 Coleman Kane --=-SIbfHldnnsoD03ouw5zp Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEABECAAYFAkhGgKoACgkQcMSxQcXat5fqFwCeJJQH0U2VxVkmiN7ZkMkghEHR SlAAnRgKMXO3mR+tlQv2MfYj8H2yKVvs =3iKW -----END PGP SIGNATURE----- --=-SIbfHldnnsoD03ouw5zp--