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

Show default value when printing options #43

merged 1 commit into from
Sep 7, 2015

Conversation

fampinheiro
Copy link
Contributor

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 + ')');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 New functionality or improvement 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
@danielb2
Copy link
Contributor

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
Copy link
Contributor

@danielb2 Done ;)

@danielb2
Copy link
Contributor

Thank you :) 👍

@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New functionality or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants