From owner-cvs-src@FreeBSD.ORG Tue Jun 3 15:18:24 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 B2DEE1065731 for ; Tue, 3 Jun 2008 15:18:24 +0000 (UTC) (envelope-from florent.thoumie@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.181]) by mx1.freebsd.org (Postfix) with ESMTP id 60DAA8FC20 for ; Tue, 3 Jun 2008 15:18:24 +0000 (UTC) (envelope-from florent.thoumie@gmail.com) Received: by py-out-1112.google.com with SMTP id p76so772995pyb.10 for ; Tue, 03 Jun 2008 08:18:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=fA0y377MkpAWe+dwTOc9snOGGCHFYGzN8Bs4kDUxaDU=; b=CCR9XTG8sAtKE4NWg0XQG5u2fTw2TqYSXVAYwmW8peJL/fkkosWnxEtkJYwGidPKikBWLzZrlX7sUkYz+2PTZkPbRm633C+uPvGIwQfc0F1lQbuNf13bmeM6M4WjOGp6Rf+NMU5okyHLdUKMU7MHCv4ivZ9ZHeynN99uFYOXWp4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=BRIbgrn6+C+UTx4jkjT3AibuiuZaz+1tEiTfIuZUR47THEv4Dt5xnr0N6ncWV/eQ4kltseSkrrtvEu5s1FX1E6V4hEvGj8eEgSmNkcb7P5avW5P2eR5WTVDHt3nGpNzDWFYu640kC/0tqP3lIs8qHtWWrbbotKJj5ibcshcVxZA= Received: by 10.114.120.1 with SMTP id s1mr801019wac.31.1212506303264; Tue, 03 Jun 2008 08:18:23 -0700 (PDT) Received: by 10.114.60.15 with HTTP; Tue, 3 Jun 2008 08:18:23 -0700 (PDT) Message-ID: Date: Tue, 3 Jun 2008 16:18:23 +0100 From: "Florent Thoumie" Sender: florent.thoumie@gmail.com To: "Coleman Kane" In-Reply-To: <1212179252.1967.1.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200805301426.m4UEQ92d025434@repoman.freebsd.org> <48405C4B.3050603@FreeBSD.org> <1212179252.1967.1.camel@localhost> X-Google-Sender-Auth: ae0c33dad0fe6ddb Cc: Maxim Sobolev , src-committers@freebsd.org, cvs-all@freebsd.org, 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: Tue, 03 Jun 2008 15:18:24 -0000 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