def getAction(self, longname):
        """
        Return a zsh "action" string for the given argument
        @return: C{str}
        """
        if longname in self.optActions:
            if callable(self.optActions[longname]):
                action = self.optActions[longname]()
            else:
                action = self.optActions[longname]
            return action._shellCode(longname, usage._ZSH)

        if longname in self.paramNameToDefinition:
            return ':%s:_files' % (longname,)
        return ''

        Return a zsh "action" string for the given argument
        @return: C{str}
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/python/_shellcomp.py