bugGNU Gengetopt - Bugs: bug #34409, Reorder display of options

 
 

bug #34409: Reorder display of options

Submitter:  Reuben Thomas <rrt>
Submitted:  Tue 27 Sep 2011 12:11:51 PM UTC
   
 
Category:  None Severity:  1 - Wish
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  gscano
Originator Name:  Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 19 Nov 2020 07:37:50 AM UTC, comment #4: 

Excellent stuff; I look forward to being able to use gengetopt in more programs!

Reuben Thomas <rrt>
Thu 19 Nov 2020 02:03:10 AM UTC, comment #3: 

Absolutely!

Those options should be automatically handled when manually specified or added by default unless "--no-handle-help" or "--no-handle-version" are respectively specified.

It is part of the corresponding debug branch now,
Thanks.

Grégoire Scano <gscano>
Group Member
Wed 18 Nov 2020 01:51:41 PM UTC, comment #2: 

Thanks for looking at this. I agree, after studying some more commands, that the order of `--help` and `--version` is not fixed even in GNU commands, and the order you picked may be used by more commands.

I also agree with your "However…", especially because no scheme will please everyone, so it should be possible to order things manually.

Is it possible to put the "--version" and "--help" flags into the help manually but still have the code to implement them generated automatically?

Reuben Thomas <rrt>
Wed 18 Nov 2020 01:42:58 PM UTC, comment #1: 

Thanks,

I changed the wording and the order of the options on the bug/34409 branch but, since I saw --version after --help on a few GNU commands, I reversed their relative position.

However, it is not ideal for commands with sections and for which those options should appear in the first section and not at the end of the output (gengetopt itself is an example, but gcc and ld are others). Solutions to this problem would bring more complexity to the software; so I think it would be best for the user to manually state the options in the .ggo file when having --help and --version at the end of the output is not desirable.

Grégoire Scano <gscano>
Group Member
Tue 27 Sep 2011 12:11:51 PM UTC, original submission:  

The --help and --version options should be shown at the end of the options help text, not at the start, and in the other order, i.e.:

  -V, --version        Print version and exit
  -h, --help           Print help and exit

Also, the wording could be improved, as per current coreutils/grep:

  -V, --version        output version information and exit
  -h, --help           display help and exit

Note that the help strings should not start with an upper-case letter.

Reuben Thomas <rrt>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gscano (Updated the item)
  • -email is unavailable- added by rrt (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-11-18 gscano StatusIn Progress Fixed
    2020-11-18 gscano Severity3 - Normal 1 - Wish
        StatusNone In Progress
        Assigned toNone gscano

    Back to the top

    Powered by Savane 3.13-4b4b.
    Corresponding source code