All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Ben Hutchings <bhutchings@solarflare.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	Stephen Hemminger <stephen.hemminger@vyatta.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH ethtool 5/5] ethtool: Add --version option
Date: Tue, 22 Feb 2011 16:35:16 -0500	[thread overview]
Message-ID: <4D642C14.6020505@garzik.org> (raw)
In-Reply-To: <1298379945.2861.7.camel@edumazet-laptop>

On 02/22/2011 08:05 AM, Eric Dumazet wrote:
> Le mardi 22 février 2011 à 12:37 +0000, Ben Hutchings a écrit :
>> On Mon, 2011-02-21 at 22:16 -0800, Stephen Hemminger wrote:
>> [...]
>>> The standard convention is to use -V for short form of version option.
>>
>> This is not anywhere near standard.
>>
>> $ cp -V
>> cp: invalid option -- 'V'
>> Try `cp --help' for more information.
>> $ bash -V
>> bash: -V: invalid option
>> [...]
>> $ emacs -V
>> [opens window]
>> $ vim -V
>> chdir(/usr/share/vim)
>> fchdir() to previous dir
>> sourcing "$VIM/vimrc"
>> [...looks like that meant 'verbose'...]
>
> Now try with networking tools, many use -V
>
> (As a matter of fact, ethtool -h already is used to display help)
>
> # ping -V
> ping utility, iputils-sss20071127
> # tc -V
> tc utility, iproute2-ss100823
> # ssh -V
> OpenSSH_5.1p1 Debian-5, OpenSSL 0.9.8g 19 Oct 2007

Stephen is correct, "-V" is a common standard (but by no means 
universal).  The following is what using argp ("info argp") generates 
for any program by default:

> Usage: myprog [OPTION...]
> myprog - a program that does something
>
> [...]
>
>   -?, --help                 Give this help list
>       --usage                Give a short usage message
>   -V, --version              Print program version
>
> Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options.

Regards,

	Jeff



  reply	other threads:[~2011-02-22 21:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-21 19:16 [PATCH ethtool 0/5] Add --version option and fix some bugs in show_usage() Ben Hutchings
2011-02-21 19:17 ` [PATCH ethtool 1/5] ethtool: Split show_usage() into two functions Ben Hutchings
2011-02-21 19:18 ` [PATCH ethtool 2/5] ethtool: Report an error if given an unrecognised option Ben Hutchings
2011-02-21 19:18 ` [PATCH ethtool 3/5] ethtool: Allow for long options with no short option and without a device name Ben Hutchings
2011-02-21 19:18 ` [PATCH ethtool 4/5] ethtool: Indent the no-options usage line consistently with the others Ben Hutchings
2011-02-21 19:19 ` [PATCH ethtool 5/5] ethtool: Add --version option Ben Hutchings
2011-02-22  6:16   ` Stephen Hemminger
2011-02-22 12:37     ` Ben Hutchings
2011-02-22 13:05       ` Eric Dumazet
2011-02-22 21:35         ` Jeff Garzik [this message]
2011-02-22 21:49           ` Ben Hutchings

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D642C14.6020505@garzik.org \
    --to=jeff@garzik.org \
    --cc=bhutchings@solarflare.com \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen.hemminger@vyatta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.