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

Way to emit help message that includes non-option arguments #17

Open
MikeTaylor opened this issue May 17, 2018 · 0 comments
Open

Way to emit help message that includes non-option arguments #17

MikeTaylor opened this issue May 17, 2018 · 0 comments

Comments

@MikeTaylor
Copy link

The help message that's autogenerated from the options is of the form

Usage:
  node myprog [OPTION]

Options:
  -v, --verbose Verbose mode
  [etc.]

But often the usage of myprog includes other, non-option, arguments, such as a filename to read. So I'd like the first part to read (say) Usage: node myprog [OPTION] <filename>.

It would be nice to have a simpler way to do this than by copying the default this.help value from the source, modifying it as needed and feeding it to setHelp.

Maybe something like a setHelpExtraArgs('<filename>')?

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

1 participant