# ``twisted`.`python`.`usage`.`Completer``

class documentation

`class Completer: (source)`

Known subclasses: `twisted.python._shellcomp.SubcommandAction`, `twisted.python.usage.CompleteDirs`, `twisted.python.usage.CompleteFiles`, `twisted.python.usage.CompleteGroups`, `twisted.python.usage.CompleteHostnames`, `twisted.python.usage.CompleteList`, `twisted.python.usage.CompleteMultiList`, `twisted.python.usage.CompleteNetInterfaces`, `twisted.python.usage.CompleteUserAtHost`, `twisted.python.usage.CompleteUsernames`

View In Hierarchy

A completion "action" - provides completion possibilities for a particular command-line option. For example we might provide the user a fixed list of choices, or files/dirs according to a glob.

This class produces no completion matches itself - see the various subclasses for specific completion functionality.

Method | `__init__` |
Method | `_description` | Undocumented
Method | `_shellCode` | Fetch a fragment of shell code representing this action which is suitable for use by the completion system in _shellcomp.py
Instance Variable | `_descr` | Undocumented
Instance Variable | `_repeat` | Undocumented
Property | `_repeatFlag` | Undocumented

def __init__(self, descr=None, repeat=False): (source)
overridden in `twisted.python.usage.CompleteFiles`, `twisted.python.usage.CompleteList`, `twisted.python.usage.CompleteMultiList`

Parameters
descr:`str` | An optional descriptive string displayed above matches.
repeat:`bool` | A flag, defaulting to False, indicating whether this `Completer` should repeat - that is, be used to complete more than one command-line word. This may ONLY be set to True for actions in the `extraActions` keyword argument to `Completions`. And ONLY if it is the LAST (or only) action in the `extraActions` list.

def _description(self, optName): (source)
overridden in `twisted.python.usage.CompleteFiles`

Undocumented

def _shellCode(self, optName, shellType): (source)
overridden in `twisted.python._shellcomp.SubcommandAction`, `twisted.python.usage.CompleteDirs`, `twisted.python.usage.CompleteFiles`, `twisted.python.usage.CompleteGroups`, `twisted.python.usage.CompleteHostnames`, `twisted.python.usage.CompleteList`, `twisted.python.usage.CompleteMultiList`, `twisted.python.usage.CompleteNetInterfaces`, `twisted.python.usage.CompleteUserAtHost`, `twisted.python.usage.CompleteUsernames`
Fetch a fragment of shell code representing this action which is suitable for use by the completion system in _shellcomp.py

Parameters
optName:`str` | The long name of the option this action is being used for.
shellType:`str` | One of the supported shell constants e.g. `twisted.python.usage._ZSH`

_descr = (source)
overridden in `twisted.python.usage.CompleteGroups`, `twisted.python.usage.CompleteUserAtHost`

Undocumented

_repeat = (source)

Undocumented

@property
_repeatFlag = (source)

Undocumented