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

feat: enable .help() and .version() by default #912

Merged
merged 1 commit into from
Jul 11, 2017
Merged

Conversation

bcoe
Copy link
Member

@bcoe bcoe commented Jul 8, 2017

Almost 100% of my applications written with yargs have this boilerplate:

const argv = require('yargs')
    .help()
    .version()
    .argv

I figured, why the heck don't we just enable .version and .help by default? (probably should have done this years ago).

BREAKING CHANGE: version and help keys are now enabled by default, and show up in help output; the implicit help command can no longer be enabled/disabled independently from the help command itself (which can now be disabled).

@bcoe bcoe merged commit 1ef44e0 into master Jul 11, 2017
@bcoe bcoe deleted the enable-help-version branch July 11, 2017 05:28
@ghost
Copy link

ghost commented Aug 3, 2017

Any new release planned soon with this?

@bcoe
Copy link
Member Author

bcoe commented Sep 3, 2017

@ghost this new feature is queued to go out in the next release of yargs, would love your help testing if you're interested:

npm i yargs@next 👍 will be published for real as soon as we've tested it thoroughly.

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.

1 participant