Replies: 1 comment
-
You can put
for the color to be red by default. If you also want the option to toggle between color or no color, I think you should add an additional boolean flag that decides exactly that. |
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Commit to Help
Example Code
Description
Operating System
Linux
Operating System Details
No response
Typer Version
typer==0.16.1
Python Version
Python 3.8.10
Additional Context
This feature is useful when a certain operation has multiple options but one of them is the preferred choice in most cases.
Forcing the users to actually choose it is not a nice experience.
In there any way to accomplish this right now?
All options that I can pass to
Option
seem to only apply after it parsed. Evenparse
expects to have the second value to parse.This is basically a flag where just providing the option sets the default value but it is allowed to pass also a value to select from. This would also apply to any other
Option
orArgument
type.Beta Was this translation helpful? Give feedback.
All reactions