Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to alphabetize help output #910

Closed
NickHeiner opened this issue Jan 25, 2019 · 5 comments
Closed

Add option to alphabetize help output #910

NickHeiner opened this issue Jan 25, 2019 · 5 comments

Comments

@NickHeiner
Copy link

The auto-generated --help output is a neat feature of this module. What if the flags were listed in alphabetical order? This could particularly help for programs with many flags.

Options
  -a A explanation
  -b B explanation
  -c C explanation
@shadowspawn
Copy link
Collaborator

#625 is the same request, but for commands

@shadowspawn
Copy link
Collaborator

I think having options sorted is a good default, but am concerned how many users over the years have carefully created custom orders for their help and would be disappointed by an enforced change.

Do we need to provide an opt-out for sorting?

@shadowspawn
Copy link
Collaborator

For interest, the POSIX specifications for Utility Conventions say:

Options are usually listed in alphabetical order unless this would make the utility description more confusing.

However, the utility conventions only include single character options (aka flags) so is describing a simpler situation.

@shadowspawn
Copy link
Collaborator

This issue has not had any activity in over six months. It isn't likely to get acted on due to this report (although it is a reasonable suggestion).

Feel free to open a new issue if it comes up again, with new information and renewed interest.

Thank you for your contributions.

@shadowspawn
Copy link
Collaborator

Commander 7 allows:

program.configureHelp({
   sortOptions: true
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants