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
I used the GitHub search to find a similar issue and didn't find it.
I searched the Typer documentation, with the integrated search.
I already searched in Google "How to X in Typer" and didn't find any information.
I already searched in Google "How to X in Click" and didn't find any information.
Description
Is it possible to implement a global option so it can be added anywhere in the commandline and to be displayed in the help for each subcommand.
Additional context
It is well documented how to create a global option with callback, but it seems to have some limitations. It seems to me that a global option «foo» can only be set like this:
command --foo bar subcommand
but not like this:
command subcommand --foo bar
And also, the help for «foo» will only be displayed on:
command --help
not
command subcommand --help
Is there a way to make the global option more flexible?
The text was updated successfully, but these errors were encountered:
Yes, I should have closed this back in 2020. Thanks for the feedback.
In that case, we can continue in that issue, right?
Sorry for the long delay! see_no_evil I wanted to personally address each issue/PR and they piled up through time, but now I'm checking each one in order.
First check
Description
Is it possible to implement a global option so it can be added anywhere in the commandline and to be displayed in the help for each subcommand.
Additional context
It is well documented how to create a global option with callback, but it seems to have some limitations. It seems to me that a global option «foo» can only be set like this:
command --foo bar subcommandbut not like this:
command subcommand --foo barAnd also, the help for «foo» will only be displayed on:
command --helpnot
command subcommand --helpIs there a way to make the global option more flexible?
The text was updated successfully, but these errors were encountered: