Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So as you already found out, this is invalid due to
cacprovide this by defaultThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I unfortunately don't see an option in
cacto provide any kind of global option aside text for all options. There are a couple methods likeusage,example, orcommanddescription I could leverage but the output isn't the greatest and doesn't seem fit for this use case.I could use example and show one usage of using the negation option feature of
cac?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah oh, so this theoretically overrides just the description text?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this is something you could discuss in an issue or discussion in cac @drobannx , maybe they have best practices already
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the change in this PR would only show that additional option but
cacdoes treat the defaults differently in this case.https://github.com/cacjs/cac#negated-options
So this change would set
opento true by default but then passing--no-openas an arg would set the value to falseThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you got it yourself, but just want to mention it: changing the default value is not an option
The default have to be
falsein this caseThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matias-capeletto - I'll go ahead and close this PR and see if there is some discussion over in
cacabout this. Thank you and @Shinigami92 for your time in helping with this, I appreciate it!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there already is an open PR over there for this very issue: cacjs/cac#104