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 default value when printing options #43

Merged
merged 1 commit into from Sep 7, 2015
Merged

Conversation

@fampinheiro
Copy link
Contributor

fampinheiro commented Sep 6, 2015

This PR adds the default option in grey after the argument description.

Options:

  -c, --currency       currency (eur)
@@ -213,6 +213,10 @@ exports.usage = function (definition, usage, options) {
}

var formattedDesc = def.description ? color.gray(def.description) : '';
if (def.default) {
formattedDesc += formattedDesc.length ? ' ' : '';
formattedDesc += color.gray('(' + def.default + ')');

This comment has been minimized.

Copy link
@sericaia

sericaia Sep 7, 2015

Contributor

I just don't know if having it in grey is the best option, but I will accept it. Thanks! 👍

@sericaia sericaia added this to the 2.0.1 milestone Sep 7, 2015
@sericaia sericaia added the feature label Sep 7, 2015
sericaia added a commit that referenced this pull request Sep 7, 2015
Show default value when printing options
@sericaia sericaia merged commit 2ceacc4 into hapijs:master Sep 7, 2015
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@danielb2

This comment has been minimized.

Copy link
Contributor

danielb2 commented Feb 12, 2016

Any chance you can do a new release so we can see the benefits of this PR?

After all, it's been five months

@sericaia

This comment has been minimized.

Copy link
Contributor

sericaia commented Feb 12, 2016

@danielb2 Done ;)

@danielb2

This comment has been minimized.

Copy link
Contributor

danielb2 commented Feb 12, 2016

Thank you :) 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.