All of lore.kernel.org
 help / color / mirror / Atom feed
From: A Large Angry SCM <gitzilla@gmail.com>
To: freku045@student.liu.se
Cc: git@vger.kernel.org
Subject: Re: [PATCH 0/25] Usage message clean-up
Date: Sat, 10 Dec 2005 14:13:57 -0800	[thread overview]
Message-ID: <439B5325.8000504@gmail.com> (raw)
In-Reply-To: <1134243476675-git-send-email-freku045@student.liu.se>

freku045@student.liu.se wrote:
...
> I have tried to follow the following rules:
> 
> * Any unrecognised options should make the script die with the usage
>   message.

Good.

> * -h and --help makes the script die with the usage message.

This should not be an error. The user was asking for the usage message.

> * The message is printed to stderr.

Good unless the message was printed due to -h or --help, then it should 
go to stdout.

> * The message is of the form "usage: $0 options"
> 
> I am not convinced that the last bullet point is the best way to do
> things. Using "$0" is probably best for Git developers but using "git
> program-name" is probably least confusing for users, especially if we
> are going to move the git-* binaries away from /usr/bin. Another
> option is "basename $0". What do you think?

Not using $0 can make it _extremely_ annoying to determine exactly which 
program printed the usage message. It may look prettier without the path 
but if I have more that one $(basename $0) it may not be trivial to 
determine the one that issued the message. Also keep in mind that is it 
possible to have spaces in names of executables. So, "foo-bar" and "foo 
bar" may be two different executables.

  parent reply	other threads:[~2005-12-10 22:14 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-10 19:37 [PATCH 0/25] Usage message clean-up freku045
2005-12-10 19:37 ` [PATCH 1/25] git-bisect: Use $0 instead of program name in usage message freku045
2005-12-10 19:37 ` [PATCH 2/25] git-branch: " freku045
2005-12-10 19:37 ` [PATCH 8/25] git-fetch: Print usage message if we get an unrecognized option freku045
2005-12-10 19:37 ` [PATCH 9/25] git-format-patch: Use the 'die'-function where appropriate freku045
2005-12-10 19:37 ` [PATCH 4/25] git-cherry: Print the usage message if we get an unknown option freku045
2005-12-10 19:37 ` [PATCH 7/25] git-count-objects: Die with usage message if we are invoked incorrectly freku045
2005-12-11  4:22   ` Junio C Hamano
2005-12-10 19:37 ` [PATCH 5/25] git-clone: Use $0 instead of program name in usage message freku045
2005-12-10 19:37 ` [PATCH 6/25] git-commit: " freku045
2005-12-10 19:37 ` [PATCH 3/25] git-checkout: " freku045
2005-12-10 19:37 ` [PATCH 14/25] git-prune: Print " freku045
2005-12-10 19:37 ` [PATCH 16/25] git-push: Clean up " freku045
2005-12-10 19:37 ` [PATCH 13/25] git-merge: Print $0 instead of program name in " freku045
2005-12-10 19:37 ` [PATCH 10/25] git-grep: Print usage message on '-h' and '--help' freku045
2005-12-10 19:37 ` [PATCH 12/25] git-lost-found: Print usage message on incorrect invocation freku045
2005-12-10 19:37 ` [PATCH 16/25] git-push: Clean-up usage message freku045
2005-12-10 19:37 ` [PATCH 15/25] git-pull: Don't print an extra new line at the end of the " freku045
2005-12-10 19:37 ` [PATCH 11/25] git-revert: Fix " freku045
2005-12-10 19:37 ` [PATCH 18/25] git-repack: Print usage message on unrecognized option freku045
2005-12-10 19:37 ` [PATCH 17/25] git-relink: Print usage message to stderr freku045
2005-12-11  4:26   ` Junio C Hamano
2005-12-10 19:37 ` [PATCH 19/25] git-request-pull: " freku045
2005-12-10 19:37 ` [PATCH 20/25] git-reset: Use $0 instead of program name in usage message freku045
2005-12-10 19:37 ` [PATCH 23/25] git-tag: Clean-up " freku045
2005-12-10 19:37 ` [PATCH 21/25] git-send-email: Usage message clean-up freku045
2005-12-11  4:30   ` Junio C Hamano
2005-12-10 19:37 ` [PATCH 22/25] git-status: Print usage message on incorrect invocation freku045
2005-12-10 19:38 ` [PATCH 25/25] git-mv: Clean-up usage message freku045
2005-12-10 19:38 ` [PATCH 24/25] git-verify-tag: " freku045
2005-12-10 22:13 ` A Large Angry SCM [this message]
2005-12-10 22:50 ` [PATCH 0/25] Usage message clean-up Johannes Schindelin
2005-12-11  2:58   ` Junio C Hamano
2005-12-11 11:16 ` Nikolai Weibull

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=439B5325.8000504@gmail.com \
    --to=gitzilla@gmail.com \
    --cc=freku045@student.liu.se \
    --cc=git@vger.kernel.org \
    /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.