How to have shared options #934
Unanswered
JohnScottUK
asked this question in
Q&A
Replies: 1 comment
-
I believe this discussion and this issue will help determine how this can work |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a cli tool that takes multiple commands - like git. How would I define the common options:
my-cli [common-options] command [command-options]
e.g.
my-cli --verbose cmdA --optionA ABCD
my-cli --verbose cmdB --optionB BCDE
I can see how to define command specific options against each command (i.e. optionA and optionB), but how to I create common options like --verbose?
In my specific case, I wanted to have --verbose change the logging level to verbose and --debug change the logging level to debugging.
Beta Was this translation helpful? Give feedback.
All reactions