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.
This will enhance the way (flags | args) are displayed. Developers will no longer need to read the flag's description to grasp the type|format of value they have to use with a certain flag or arg. For example, when I read
filePath
I immediately understand that a certain flag require a file path.Below you can see how docker cli does it
obs: I added a new property called
typeLabel
instead of using thehelpValue
because I did not want to force cli developers to use it, and because the variable name better describe what it is than helpValueBEFORE
AFTER
To enable this render type CLI developers have to set
oclif.showFlagTypeLabel
totrue
in thepackage.json
When
typeLabel
is not defined, andoclif.showFlagTypeLabel
is true instead of showing=<option>
it is displayedstring
, orstring...
if multiple. It feels cleaner in my opinion.When combining with the theme and indent features