bugGNU Gengetopt - Bugs: bug #34399, Mutually-exclusive groups...

 
 

bug #34399: Mutually-exclusive groups considered harmful

Submitted by:  Reuben Thomas <rrt>
Submitted on:  Mon 26 Sep 2011 09:10:01 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Originator Name: Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 27 Sep 2011 12:39:11 AM UTC, comment #2:

I am sorry, my initial analysis is faulty. Groups should be kept, but multiple settings should be allowed on the command line, with later flags overriding earlier flags, rather than causing an error.

Apologies for the confused initial analysis.

Reuben Thomas <rrt>
Mon 26 Sep 2011 09:13:54 PM UTC, comment #1:

It is not normal for command-line programs to have mutually-exclusive group flags. The reason for this is that a command-line may be assembled by more than one cooperating program. The standard way to deal with mutually exclusive flags is for the last flag given to take precedence over previous flags.

For example, consider the sort order of ls.

Removing groups would not only encourage authors to write more flexible command-line programs, but it would also make it easier to understand modes, which are very similar to groups. For example, look at the main menu of the info manual:

  • Group options:: Groups of mutual exclusive options
  • Mode options:: Mutual exclusive group of options

The sub-headings look very similar! Getting rid of groups would be an easy way to fix this confusion.

Reuben Thomas <rrt>
Mon 26 Sep 2011 09:10:01 PM UTC, original submission:
Reuben Thomas <rrt>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rrt (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup