Skip to content

Prefix events to prevent conflicts between commands and options#494

Merged
abetomo merged 1 commit intotj:masterfrom
ajfranzoia:fix-prevent-conflicts
Jun 27, 2017
Merged

Prefix events to prevent conflicts between commands and options#494
abetomo merged 1 commit intotj:masterfrom
ajfranzoia:fix-prevent-conflicts

Conversation

@ajfranzoia
Copy link
Copy Markdown
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.

@segfaultmedaddy
Copy link
Copy Markdown
Collaborator

LGTM

@yausername
Copy link
Copy Markdown
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')
})

@segfaultmedaddy
Copy link
Copy Markdown
Collaborator

segfaultmedaddy 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