[GRASS-dev] strange help text indentation

Hi,

I just discovered that (IMHO) the help layout in the CMD line output
was apparently messed up. Example:

d.vect help
...
       layer Layer number
           Layer number. If -1, all layers are displayed.
               default: 1
        cats Category values
           Example: 1,3,7-9,13
       where WHERE conditions of SQL statement without 'where' keyword.
           Example: income < 1000 and inhab >= 10000
...

should be something like:

       layer Layer number
                  Layer number. If -1, all layers are displayed.
                  default: 1
        cats Category values
                  Example: 1,3,7-9,13
       where WHERE conditions of SQL statement without 'where' keyword.
                  Example: income < 1000 and inhab >= 10000

Was there a reason to shift it to the left?

Markus

Markus Neteler wrote:

Hi,

I just discovered that (IMHO) the help layout in the CMD line output
was apparently messed up. Example:

d.vect help
...
       layer Layer number
           Layer number. If -1, all layers are displayed.
               default: 1
        cats Category values
           Example: 1,3,7-9,13
       where WHERE conditions of SQL statement without 'where'
       keyword.
           Example: income < 1000 and inhab >= 10000
...

should be something like:

       layer Layer number
                  Layer number. If -1, all layers are displayed.
                  default: 1
        cats Category values
                  Example: 1,3,7-9,13
       where WHERE conditions of SQL statement without 'where'
       keyword.
                  Example: income < 1000 and inhab >= 10000

Was there a reason to shift it to the left?

the indented text is when you have both a ->label and ->description
defined, eg lib/gis/parser.c standard options:

        case G_OPT_V_CATS:
            Opt->key = "cats";
            Opt->type = TYPE_STRING;
            Opt->key_desc = "range";
            Opt->required = NO;
            Opt->label = _("Category values");
            Opt->description = _("Example: 1,3,7-9,13");

It is a bit weird though, usually you use ->description, but when you
use '->label' your '->description' becomes the tooltip in the GUI (or
badly indented text) and the label becomes the description!!??
I would think ->description should hold its meaning and label be for
an optional tooltip when supplied.

So I don't know why, but if you follow the history of the ->label
option you might find a clue. Probably just a mistake?

Hamish