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

Re: [RFC] Add support for short help to Cogito commands

From
Petr Baudis <pasky@suse.cz>
Date
Nov 15, 2005, 22:17 UTC
Message-ID
<20051115221756.GX30496@pasky.or.cz>
In-Reply-To
<20051115125516.GD13925@diku.dk>
  Hi,

Dear diary, on Tue, Nov 15, 2005 at 01:55:16PM CET, I got a letter where Jonas Fonseca <fonseca@diku.dk> said that...

Show 5 quoted lines
> I hope I am not the only one feeling that -h can sometimes be a little
> too verbose when you want to have a quick overview of a Cogito command.
> I'd like to make -h show only a short summary of the available options
> and keep the longer help text for --help. I have attached a patch that
> does something like this. Example:

Good idea. Perhaps even make this default for --help as well and offer --long-help. cg-help would still default to the long help, unless -s or something would be passed to it.

Show 15 quoted lines
>  - Add a special line with the caption. Since we already 'filters' the
>    help text in the script headers this could go after the '::'.
>    Example:
> 
> 	# ...
> 	#
> 	# -r FROM_ID[..TO_ID]:: Specify revisions to diff
> 	#	Specify the revisions to diff using either '-r rev1
> 	#	...
> 
>    So that it will be easy to remove from the --help output and from the
>    generated manpages.
> 
> The last option is less intrusive, but does make the syntax of the
> script headers less clean. Comments?

I prefer the second option and don't think it's much less clean. I think it would be actually uglier the other way - strange without separating empty line, too long with the separating line.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
VI has two modes: the one in which it beeps and the one in which
it doesn't.
Previous: Jonas FonsecaNext: Jonas Fonseca
Message 2 of 3 in “[RFC] Add support for short help to Cogito commands”
  1. Jonas FonsecaNov 15, 2005
  2. Petr BaudisNov 15, 2005
  3. Add short help to Cogito commandsJonas Fonseca, Nov 16, 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.