-
-
Notifications
You must be signed in to change notification settings - Fork 624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QUESTION] How to implement global options. #42
Comments
By inspecting the code it seems like this is not possible right now. |
I'd be tempted to say like in click with a I tried various stuff with the add_typer command without being able to achieve the desired result. This is the main blocker identified for us so far switching from click as we make quite a fair use of global switches, most often for logging |
I imagine this as an option in the |
Thanks for the discussion here everyone! Here are the new docs for using And here for adding global CLI options: https://typer.tiangolo.com/tutorial/commands/callback/ 🚀 |
Thank you so much 😄 |
First check
Description
How can I implement global options like
--install-completion
,--show-completion
?Click allows to easily implement global options in context.
I want a simple function similar to typer.
Additional context
I often implement global options such as
--env
and--debug
.The text was updated successfully, but these errors were encountered: