git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC, PATCH] Usage message clean-up, take #2

From
Junio C Hamano <junkio@cox.net>
Date
Dec 11, 2005, 10:15 UTC
Message-ID
<7vu0dglz2d.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20051211095549.GB4919@c165.ib.student.liu.se>
Fredrik Kuivinen <freku045@student.liu.se> writes:
> The scripts will also set USAGE and possibly LONG_USAGE before they
> source git-sh-setup. If LONG_USAGE isn't set it defaults to USAGE.

Looks like a good start to allow us to mechanically generate parts of the manpages in the future.

Last time I played around with various bourne derivative shells, I was annoyed by that scripts sourced with '.' behaved slightly differently regarding positional arguments such as "$1", which may be one thing to watch out for (sorry, I do not remember the details right now, other than one case: ". ./foobra.sh arg1 arg2", and depending on the shell the value of $# and $1 foobra.sh sees was different. I do not think this would matter for our purpose because in our case ". script" form is never used with extra parameters).

Previous: Fredrik Kuivinen
Message 2 of 2 in “Usage message clean-up, take #2”
  1. Usage message clean-up, take #2Fredrik Kuivinen, Dec 11, 2005
  2. Junio C HamanoDec 11, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.