# ``twisted`.`python`.`_shellcomp`.`ZshBuilder``

class documentation

`class ZshBuilder: (source)`

Known subclasses: `twisted.python._shellcomp.ZshSubcommandBuilder`

View In Hierarchy

Constructs zsh code that will complete options for a given usage.Options instance, possibly including a list of subcommand names.

Completions for options to subcommands won't be generated because this class will never be used if the user is completing options for a specific subcommand. (See `ZshSubcommandBuilder` below)

Method | `__init__` | Undocumented
Method | `write` | Generate the completion function and write it to the output file @return: `None`
Instance Variable | `cmdName` | The name of the command we're generating completions for.
Instance Variable | `file` | The `file` to write the completion function to. The `file` must have `bytes` I/O semantics.
Instance Variable | `options` | The `twisted.python.usage.Options` instance defined for this command.

def __init__(self, options, cmdName, file): (source)
overridden in `twisted.python._shellcomp.ZshSubcommandBuilder`

Undocumented

def write(self, genSubs=True): (source)
overridden in `twisted.python._shellcomp.ZshSubcommandBuilder`
Generate the completion function and write it to the output file

Parameters
genSubs:`bool` | Flag indicating whether or not completions for the list of subcommand should be generated. Only has an effect if the `subCommands` attribute has been defined on the `twisted.python.usage.Options` instance.
Returns
`None`

cmdName: `str` = (source)
The name of the command we're generating completions for.
file: `file` = (source)
The `file` to write the completion function to. The `file` must have `bytes` I/O semantics.
options: `twisted.python.usage.Options` = (source)
The `twisted.python.usage.Options` instance defined for this command.