show_callback
Generates and prints the shell completion script for the current program and then exits the process. It detects the user's shell environment, retrieves the appropriate completion script content, and outputs it to the terminal using click.echo.
def show_callback(
ctx: click.Context,
param: click.Parameter,
value: Any
) - > Any
Generates and prints the shell completion script for the current CLI application and then exits the process.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | click.Context | The Click context object used to find the root program name and check for resilient parsing. |
| param | click.Parameter | The Click parameter object associated with this callback. |
| value | Any | The value passed to the parameter, which can optionally specify a target shell name as a string. |
Returns
| Type | Description |
|---|---|
Any | Returns the input value if the context is in resilient parsing mode or if the value is empty; otherwise, the function terminates the program after printing the script. |