

def writeOpt(self, longname):
    '\n        Write out the zsh code for the given argument. This is just part of the\n        one big call to _arguments\n\n        @type longname: C{str}\n        @param longname: The long option name (e.g. "verbose" instead of "v")\n\n        @return: C{None}\n        '
    if (longname in self.flagNameToDefinition):
        longField = ('--%s' % longname)
    else:
        longField = ('--%s=' % longname)
    short = self.getShortOption(longname)
    if (short != None):
        shortField = ('-' + short)
    else:
        shortField = ''
    descr = self.getDescription(longname)
    descriptionField = descr.replace('[', '\\[')
    descriptionField = descriptionField.replace(']', '\\]')
    descriptionField = ('[%s]' % descriptionField)
    actionField = self.getAction(longname)
    if (longname in self.multiUse):
        multiField = '*'
    else:
        multiField = ''
    longExclusionsField = self.excludeStr(longname)
    if short:
        shortExclusionsField = self.excludeStr(longname, buildShort=True)
        self.file.write(escape(('%s%s%s%s%s' % (shortExclusionsField, multiField, shortField, descriptionField, actionField))))
        self.file.write(' \\\n')
    self.file.write(escape(('%s%s%s%s%s' % (longExclusionsField, multiField, longField, descriptionField, actionField))))
    self.file.write(' \\\n')

dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/python/_shellcomp.py ZshArgumentsGenerator.writeOpt/original