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

Show help when command is unknown #603

Closed
0505gonzalez opened this issue Jan 13, 2017 · 3 comments
Closed

Show help when command is unknown #603

0505gonzalez opened this issue Jan 13, 2017 · 3 comments

Comments

@0505gonzalez
Copy link

Hello,

What would be the best way of printing help output when the command is unknown? E.g. program unknownCommand

@goldcaddy77
Copy link

This should work:

    program.on('*', function () {
      console.log('Unknown Command: ' + program.args.join(' '))
      program.help()
    })

It would be good to get this documented in the readme.

@roman-vanesyan
Copy link
Collaborator

Answered

@lbustelo
Copy link

@goldcaddy77 The issue with this is that the * still show in the help output

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

4 participants