From owner-cvs-src@FreeBSD.ORG Tue Jun 3 16:43:07 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 565C51065670; Tue, 3 Jun 2008 16:43:07 +0000 (UTC) (envelope-from remko@elvandar.org) Received: from websrv01.jr-hosting.nl (websrv01.jr-hosting.nl [78.47.69.233]) by mx1.freebsd.org (Postfix) with ESMTP id 1125D8FC1F; Tue, 3 Jun 2008 16:43:07 +0000 (UTC) (envelope-from remko@elvandar.org) Received: from localhost ([::1] helo=galain.elvandar.org) by websrv01.jr-hosting.nl with esmtpa (Exim 4.69 (FreeBSD)) (envelope-from ) id 1K3Zdi-000KWl-OY; Tue, 03 Jun 2008 18:45:38 +0200 Received: from 195.64.94.120 (SquirrelMail authenticated user remko) by galain.elvandar.org with HTTP; Tue, 3 Jun 2008 18:45:38 +0200 (CEST) Message-ID: <33dfad267556d52723e95461f5eb7c34.squirrel@galain.elvandar.org> In-Reply-To: References: <200805301426.m4UEQ92d025434@repoman.freebsd.org> <48405C4B.3050603@FreeBSD.org> <1212179252.1967.1.camel@localhost> Date: Tue, 3 Jun 2008 18:45:38 +0200 (CEST) From: "Remko Lodder" To: "Florent Thoumie" User-Agent: SquirrelMail/1.4.15 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Cc: Maxim Sobolev , src-committers@freebsd.org, cvs-all@freebsd.org, Coleman Kane , 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 Reply-To: remko@elvandar.org List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jun 2008 16:43:07 -0000 On Tue, June 3, 2008 5:18 pm, Florent Thoumie wrote: > On Fri, May 30, 2008 at 9:27 PM, Coleman Kane wrote: >> 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 >>> system >>> (if any)? I believe that pkg_install is the first non-contributed base >>> 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 system >>> 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 options >> when I am doing the administration myself. > > I'm not aware of such policy. > > 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: > > - pkg_create -h doesn't call usage() because it's already taken. > - it's easy to confuse pkg_info -o and pkg_info -O. > > I'll back it out if general consensus is that long options should be > avoided. > > -- > Florent Thoumie > flz@FreeBSD.org > FreeBSD Committer > I like the change (long opts). Cheers, REmko -- /"\ Best regards, | remko@FreeBSD.org \ / Remko Lodder | remko@EFnet X http://www.evilcoder.org/ | / \ ASCII Ribbon Campaign | Against HTML Mail and News