rbtools.commands.setup_completion¶
Implementation of rbt setup-completion.
Classes
|
Setup auto-completion for rbt. |
- class rbtools.commands.setup_completion.SetupCompletion(transport_cls=<class 'rbtools.api.transport.sync.SyncTransport'>, stdout=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, stderr=<_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>, stdin=<_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>)[source]¶
Bases:
BaseCommand
Setup auto-completion for rbt.
By default, the command installs an auto-completion file for the user’s login shell. The user can optionally specify a shell for which the command will install the auto-completion file for.
- description: str = 'Setup auto-completion for bash or zsh.'[source]¶
A short description of the command, suitable for display in usage text.
- Type:
- args: str = '<shell>'[source]¶
Usage text for what arguments the command takes.
Arguments for the command are anything passed in other than defined options (for example, revisions passed to rbt post).
- Type:
- SHELLS = {'bash': {'Darwin': {'dest': '/usr/local/etc/bash_completion.d', 'filename': 'rbt', 'src': 'commands/conf/rbt-bash-completion'}, 'Linux': {'dest': '/etc/bash_completion.d', 'filename': 'rbt', 'src': 'commands/conf/rbt-bash-completion'}}, 'zsh': {'Darwin': {'dest': '/usr/share/zsh/site-functions', 'filename': '_rbt', 'src': 'commands/conf/_rbt-zsh-completion'}, 'Linux': {'dest': '/usr/share/zsh/functions/Completion', 'filename': '_rbt', 'src': 'commands/conf/_rbt-zsh-completion'}}}[source]¶
A dictionary of supported shells.
Each shell contains paths to its completion file and the directory where the file will be installed.