def writeOpt(self, longname):
        if longname in self.optFlags_d:
            # It's a flag option. Not one that takes a parameter.
            long_field = "--%s" % longname
        else:
            long_field = "--%s=" % longname

        short = self.getShortOption(longname)
        if short != None:
            short_field = "-" + short
        else:
            short_field = ''

        descr = self.getDescription(longname)
        descr_field = descr.replace("[", "\[")
        descr_field = descr_field.replace("]", "\]")
        descr_field = '[%s]' % descr_field

        if longname in self.actionDescr:
            actionDescr_field = self.actionDescr[longname]
        else:
            actionDescr_field = descr

        action_field = self.getAction(longname)
        if longname in self.multiUse:
            multi_field = '*'
        else:
            multi_field = ''

        longExclusions_field = self.excludeStr(longname)

        if short:
            #we have to write an extra line for the short option if we have one
            shortExclusions_field = self.excludeStr(longname, buildShort=True)
            self.file.write(escape('%s%s%s%s%s' % (shortExclusions_field,
                multi_field, short_field, descr_field, action_field)))
            self.file.write(' \\\n')

        self.file.write(escape('%s%s%s%s%s' % (longExclusions_field,
            multi_field, long_field, descr_field, action_field)))
        self.file.write(' \\\n')
Write out the zsh code for the given argument. This is just part of the
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/python/zshcomp.py/ArgumentsGenerator.writeOpt