install_callback
Installs shell completion for the CLI, prints a confirmation message to the terminal, and terminates the process with a successful exit code.
def install_callback(
ctx: click.Context,
param: click.Parameter,
value: Any
) - > Any
Installs shell completion for the CLI and exits the program. This function is intended to be used as a Click parameter callback to handle the installation process when a specific flag is triggered.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | click.Context | The current Click context object used to check for resilient parsing mode. |
| param | click.Parameter | The Click parameter object that triggered this callback. |
| value | Any | The value passed to the parameter, which can be a string specifying a target shell or a boolean to trigger default installation. |
Returns
| Type | Description |
|---|---|
Any | The original value if the function returns early due to resilient parsing; otherwise, the process exits before returning. |