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

Prefix events to prevent conflicts between commands and options #494

Merged
merged 1 commit into from
Jun 27, 2017

Conversation

ajfranzoia
Copy link
Contributor

Prefix internal command events with 'command:' and options events with 'options:' to prevent conflicts between equally named commands and options (both user and plugin options, like --version).
This fixes #471 as well.

@roman-vanesyan
Copy link
Collaborator

LGTM

@yausername
Copy link
Contributor

Shouldn't this be added to the README? It is not documented anywhere.
I was wondering why this isn't working

program.on('verbose', function () {
  console.log('reached here')
})

@roman-vanesyan
Copy link
Collaborator

roman-vanesyan commented Apr 12, 2018

Yes, It actually should be documented. Feel free to send a pr 👍

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

Successfully merging this pull request may close these issues.

'version' is interpreted as '--version'
4 participants