Conditionally apply options to input #2690
Unanswered
Kieran-Bacon
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have outlined an issue I have had on stack overflow here
In it, I am describing a situation where I have two option groups (dynamically loaded) that have an option with the same short-hand flag. This causes an issue because the input is always parsed as one of them and not the other. I need some way of having the options being conditionally used to parse the input based on the value of another option.
Given the nature of the setup, I have little control over the construction of the options in an option group. I control the construction of the selector option, so its possible values relate to the various dynamically loaded option groups. So a solution where I can say something along the lines, apply this option group if my value is set to x would be ideal
Ultimately I think the optiongroup extension is changing the way the help information is displayed and not changing the underlying implementation of
option
.so in reality it is probably closer to, enable this list of options (disabling all others) if my value is x
Please let me know how I am meant to achieve this, or can you please add this kind of control as a feature?
$ cli -m local -p /filepath $ cli -m remote -p profile-name $ cli -m money - p 160
Beta Was this translation helpful? Give feedback.
All reactions