t.p.z.ArgumentsGenerator : class documentation

Part of twisted.python.zshcomp View Source View In Hierarchy

Generate a call to the zsh _arguments completion function based on data in a usage.Options subclass
Method __init__
Method write Write the zsh completion code to the file given to __init__ @return: None
Method writeHeader This is the start of the code that calls _arguments @return: None
Method writeOptions Write out zsh code for each option in this command @return: None
Method writeExtras Write out the "extras" list. These are just passed verbatim to the _arguments call @return: None
Method writeFooter Write the last bit of code that finishes the call to _arguments @return: None
Method verifyZshNames No summary
Method excludeStr Generate an "exclusion string" for the given option
Method makeExcludesDict
Method writeOpt Write out the zsh code for the given argument. This is just part of the one big call to _arguments
Method getAction Return a zsh "action" string for the given argument @return: str
Method getActionDescr Return the description to be used when this argument is completed @return: str
Method getDescription Return the description to be used for this argument @return: str
Method getShortOption Return the short option letter or None @return: str or None
Method addAdditionalOptions Add additional options to the optFlags and optParams lists. These will be defined by 'opt_foo' methods of the Options subclass @return: None
def __init__(self, cmd_name, options, file): (source)
Parameterscmd_nameThe name of the command (type: str)
optionsThe twisted.usage.Options instance defined for this command (type: twisted.usage.Options)
fileThe file to write the completion function to (type: file)
def write(self): (source)
Write the zsh completion code to the file given to __init__
ReturnsNone
def writeHeader(self): (source)
This is the start of the code that calls _arguments
ReturnsNone
def writeOptions(self): (source)
Write out zsh code for each option in this command
ReturnsNone
def writeExtras(self): (source)
Write out the "extras" list. These are just passed verbatim to the _arguments call
ReturnsNone
def writeFooter(self): (source)
Write the last bit of code that finishes the call to _arguments
ReturnsNone
def verifyZshNames(self): (source)
Ensure that none of the names given in zsh_* variables are typoed
ReturnsNone
RaisesValueErrorRaised if unknown option names have been given in zsh_* variables
def excludeStr(self, longname, buildShort=False): (source)
Generate an "exclusion string" for the given option
ParameterslongnameThe long name of the option (i.e. "verbose" instead of "v") (type: str)
buildShortMay be True to indicate we're building an excludes string for the short option that correspondes to the given long opt (type: bool)
ReturnsThe generated str
def makeExcludesDict(self): (source)
ReturnsA dict that maps each option name appearing in self.mutuallyExclusive to a list of those option names that is it mutually exclusive with (can't appear on the cmd line with)
def writeOpt(self, longname): (source)
Write out the zsh code for the given argument. This is just part of the one big call to _arguments
ParameterslongnameThe long name of the option (i.e. "verbose" instead of "v") (type: str)
ReturnsNone
def getAction(self, longname): (source)
Return a zsh "action" string for the given argument
Returnsstr
def getActionDescr(self, longname): (source)
Return the description to be used when this argument is completed
Returnsstr
def getDescription(self, longname): (source)
Return the description to be used for this argument
Returnsstr
def getShortOption(self, longname): (source)
Return the short option letter or None
Returnsstr or None
def addAdditionalOptions(self): (source)
Add additional options to the optFlags and optParams lists. These will be defined by 'opt_foo' methods of the Options subclass
ReturnsNone
API Documentation for Twisted, generated by pydoctor at 2012-06-04 17:20:01.