You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All I have in my arsenal is the commandContext and it doesn't help much with my use-case. Other than that, I can retrieve the rawArgs but I failed to reverse-engineer the code of the parser. It seems to use various constructor arguments I have no idea where they come from.
I can figure out if getOptionValue is the same as defaultValue, but there's a chance the user entered the same as the default value, as well. How do I know?
Consider the following (command foo has option -b has default value of bar):
shell:> foo -b bar
shell:> foo -b
shell:> foo
The first command will give the value bar, the second will give the value null, while the third will also give the value bar.
I have no idea whether the user has given -b or not, using the commandContext.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
All I have in my arsenal is the
commandContext
and it doesn't help much with my use-case. Other than that, I can retrieve the rawArgs but I failed to reverse-engineer the code of the parser. It seems to use various constructor arguments I have no idea where they come from.I can figure out if getOptionValue is the same as defaultValue, but there's a chance the user entered the same as the default value, as well. How do I know?
Consider the following (command
foo
has option-b
has default value ofbar
):The first command will give the value
bar
, the second will give the valuenull
, while the third will also give the valuebar
.I have no idea whether the user has given
-b
or not, using thecommandContext
.Beta Was this translation helpful? Give feedback.
All reactions