All of lore.kernel.org
 help / color / mirror / Atom feed
From: Goffredo Baroncelli <kreijack@libero.it>
To: Jan Schmidt <list.btrfs@jan-o-sch.net>
Cc: linux-btrfs@vger.kernel.org, Hubert Kario <kario@wit.edu.pl>,
	Hugo Mills <hugo@carfax.org.uk>
Subject: Re: [PATCH 2/2] add detailed help messages to btrfs command
Date: Mon, 11 Jul 2011 22:35:49 +0200	[thread overview]
Message-ID: <4E1B5EA5.2070704@libero.it> (raw)
In-Reply-To: <4E1B4ADC.1000202@jan-o-sch.net>

On 07/11/2011 09:11 PM, Jan Schmidt wrote:
> On 07/11/2011 08:38 PM, Goffredo Baroncelli wrote:
>> what about generating the man page on the basis of the btrfs help
>> detailed messages ?
>>
>> My idea is the following:
>> before the function source associated to the command we can put a
>> comment with a detailed help. The comment may be:
>>
>> [...]
>> /*** man:btrfs subvolume create
>>  *
>>  *  btrfs subvolume create <path>
>>  *     create a new subvolume
>>  *
>>  *  The command [b]btrfs subvolume create[b] is used.....
>>  *
>>  ***/
>>
>> void do_create_subvolume(int argc, char **argv)
>> {
>> [...]
> 
> Reminds me of java, but nevertheless, I like the general idea.
> 
>> A script extracts from the comment in the source both:
>> - the text for the man page
>> - the text for the detailed help.
> 
> Does anybody have such a script around? I suppose we're not the first
> ones writing help texts and man pages.
> 

I am trying to write a my own (yes I know, I suffer of the NIH syndrome
:-) ).

>> So we can reach the following goals:
>> - the help is linked to the code
>> - is less likely to forget to update the message
>> - the man page, the helps are always aligned
> 
> Only, we still will need like short and long help. E.g. the full text in
> the man page may be inappropriate as a --help message. Also, we do need
> a clever idea to get indentation right in the man pages. I fiddled a lot
> on the man pages for scrub parameter indentation (to get the second line
> describing a command line option indented correctly to start below the
> text of the first line, that was).

I agree for the short and long help. I think that we need to use some
tags for the bold, italic, Empty line...

> 
> -Jan
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> .
> 


  reply	other threads:[~2011-07-11 20:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-23 12:39 [PATCH 1/2] add advanced use of --help to help message Hubert Kario
2011-01-23 12:42 ` [PATCH 2/2] add detailed help messages to btrfs command Hubert Kario
2011-01-23 14:07   ` Goffredo Baroncelli
2011-01-23 14:26     ` Helmut Hullen
2011-01-23 14:43       ` Felix Blanke
2011-01-23 14:28     ` Hubert Kario
2011-01-23 14:54       ` Goffredo Baroncelli
2011-01-23 15:06         ` Hubert Kario
2011-07-11 15:13   ` Jan Schmidt
2011-07-11 18:38     ` Goffredo Baroncelli
2011-07-11 19:11       ` Jan Schmidt
2011-07-11 20:35         ` Goffredo Baroncelli [this message]
2011-07-11 22:22         ` Hugo Mills
2011-07-12 10:49           ` Hubert Kario
2011-07-12 10:40     ` Hubert Kario
2011-07-12 10:43       ` Hugo Mills

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=4E1B5EA5.2070704@libero.it \
    --to=kreijack@libero.it \
    --cc=hugo@carfax.org.uk \
    --cc=kario@wit.edu.pl \
    --cc=kreijack@inwind.it \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=list.btrfs@jan-o-sch.net \
    /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.