Undocumented
Class | CompletionItem |
No summary |
Class | ShellComplete |
Base class for providing shell completion support. A subclass for a given shell will override attributes and methods to implement the completion instructions (source and complete). |
Function | add_completion_class |
Register a ShellComplete subclass under the given name. The name will be provided by the completion instruction environment variable during completion. |
Class | BashComplete |
Shell completion for Bash. |
Class | FishComplete |
Shell completion for Fish. |
Class | ZshComplete |
Shell completion for Zsh. |
Function | _is_incomplete_argument |
Determine if the given parameter is an argument that can still accept values. |
Function | _is_incomplete_option |
Determine if the given parameter is an option that needs a value. |
Function | _resolve_context |
Produce the context hierarchy starting with the command and traversing the complete arguments. This only follows the commands, it doesn't trigger input prompts or callbacks. |
Function | _resolve_incomplete |
Find the Click object that will handle the completion of the incomplete value. Return the object and the incomplete value. |
Function | _start_of_option |
Check if the value looks like the start of an option. |
Function | get_completion_class |
Look up a registered ShellComplete subclass by the name provided by the completion instruction environment variable. If the name isn't registered, returns None. |
Function | shell_complete |
Perform shell completion for the given CLI program. |
Constant | _SOURCE_BASH |
Undocumented |
Constant | _SOURCE_FISH |
Undocumented |
Constant | _SOURCE_ZSH |
Undocumented |
Variable | _available_shells |
Undocumented |
ShellComplete
subclass under the given name.
The name will be provided by the completion instruction environment
variable during completion.Parameters | |
cls:t.Type[ | The completion class that will handle completion for the shell. |
name:t.Optional[ | Name to register the class under. Defaults to the class's name attribute. |
Parameters | |
args:t.List[ | List of complete args before the incomplete value. |
param:Parameter | Option object being checked. |
Returns | |
bool | Undocumented |
Parameters | |
cli:BaseCommand | Command being called. |
ctx_args:t.Dict[ | Undocumented |
prog_name:str | Name of the executable in the shell. |
args:t.List[ | List of complete args before the incomplete value. |
Returns | |
Context | Undocumented |
Parameters | |
ctx:Context | Invocation context for the command represented by the parsed complete args. |
args:t.List[ | List of complete args before the incomplete value. |
incomplete:str | Value being completed. May be empty. |
Returns | |
t.Tuple[ | Undocumented |
Parameters | |
value:str | Undocumented |
Returns | |
bool | Undocumented |
ShellComplete
subclass by the name
provided by the completion instruction environment variable. If the
name isn't registered, returns None.Parameters | |
shell:str | Name the class is registered under. |
Returns | |
t.Optional[ | Undocumented |
Parameters | |
cli:BaseCommand | Command being called. |
ctx_args:t.Dict[ | Extra arguments to pass to cli.make_context. |
prog_name:str | Name of the executable in the shell. |
complete_var:str | Name of the environment variable that holds the completion instruction. |
instruction:str | Value of complete_var with the completion instruction and shell, in the form instruction_shell. |
Returns | |
int | Status code to exit with. |
str
=
Undocumented
Value |
|
str
=
Undocumented
Value |
|