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.
Actually, both variations (with and without
--no
) should be present in this case, regardless of the default value (using the variant that corresponds to the default value should be possible, too). In this example, e.g.--generate-name
and--no-generate-name
should be both available all the time (corresponding--generate-name=true
and--generate-name=false
).The reason why I prefer this variant is:
kn
?)--with-
and--no-
for true and false)ls -l
)kn --help
(or would we like to switch tokn --help=true
?). Other examples:kn service create --force
orkn service create --async
would have change tokn service create --force=true
andkn service create --async=true
(or maybe in the latter case--sync=false
)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.
I have the same feeling.
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.
just noticed your statement here:
--help
continues to work as cobra defaults it to meantrue
. so full form--flag=false
is only necessary when turning things off.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.
@cppforlife
Have you triedMy bad, it works as expected (no arg == help). You can usekn --help=false
?kn service list --help=false
, too.