class documentation

Shell completion for Bash.

Method format_completion Format a completion item into the form recognized by the shell script. This must be implemented by subclasses.
Method get_completion_args Use the env vars defined by the shell script to return a tuple of ``args, incomplete``. This must be implemented by subclasses.
Method source Produce the shell script that defines the completion function. By default this ``%``-style formats :attr:`source_template` with the dict returned by :meth:`source_vars`.
Class Variable name Name to register the shell as with :func:`add_completion_class`. This is used in completion instructions (``{name}_source`` and ``{name}_complete``).
Method _check_version Undocumented

Inherited from ShellComplete:

Method __init__ Undocumented
Method complete Produce the completion data to send back to the shell.
Method get_completions Determine the context and last complete command or parameter from the complete args. Call that object's ``shell_complete`` method to get the completions for the incomplete value.
Method source_vars Vars for formatting :attr:`source_template`.
Class Variable source_template Completion script template formatted by :meth:`source`. This must be provided by subclasses.
Instance Variable cli Undocumented
Instance Variable complete_var Undocumented
Instance Variable ctx_args Undocumented
Instance Variable prog_name Undocumented
Property func_name The name of the shell function defined by the completion script.
def format_completion(self, item): (source)

Format a completion item into the form recognized by the shell script. This must be implemented by subclasses. :param item: Completion item to format.

Parameters
item:CompletionItemUndocumented
Returns
strUndocumented
def get_completion_args(self): (source)

Use the env vars defined by the shell script to return a tuple of ``args, incomplete``. This must be implemented by subclasses.

Returns
t.Tuple[t.List[str], str]Undocumented
def source(self): (source)

Produce the shell script that defines the completion function. By default this ``%``-style formats :attr:`source_template` with the dict returned by :meth:`source_vars`.

Returns
strUndocumented
name: str = (source)

Name to register the shell as with :func:`add_completion_class`. This is used in completion instructions (``{name}_source`` and ``{name}_complete``).

def _check_version(self): (source)

Undocumented