Module Expr Str Import alias Expr Call AttributeLoad NameLoad attr Str NameLoad keyword Num Import alias alias alias alias ImportFrom alias alias alias ImportFrom alias ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore Str Assign NameStore Str Assign NameStore ListLoad ListLoad Str Str Str Assign NameStore ListLoad ListLoad Str Str NameLoad Str FunctionDef arguments args NameParam defaults body If BoolOpAnd SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str body Raise AttributeLoad NameLoad attr Str If BoolOpAnd UnaryOpNot SubscriptLoad NameLoad Index Str UnaryOpNot SubscriptLoad NameLoad Index Str body Raise AttributeLoad NameLoad attr Str If BoolOpAnd SubscriptLoad NameLoad Index Str UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str body Raise AttributeLoad NameLoad attr BinOpMod Str SubscriptLoad NameLoad Index Str decorator_list decorator_list ClassDef bases body FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str ImportFrom alias identifier Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr ListLoad Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr For NameStore NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad Assign NameStore Str decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad Assign NameStore Str decorator_list ClassDef bases body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr ListLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call NameLoad AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Assign NameStore ListLoad Assign NameStore ListLoad Expr Call NameLoad AttributeLoad NameLoad attr Str NameLoad Expr Call NameLoad AttributeLoad NameLoad attr Str NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body If CompareNotEq Call NameLoad NameLoad Num body Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr Num NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body If CompareNotEq Call NameLoad NameLoad Num body Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad NameLoad attr Num NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Dict For NameStore NameLoad body Assign SubscriptStore NameLoad Index SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Slice Num Assign AttributeStore NameLoad attr NameLoad Assign NameStore Dict For NameStore NameLoad body Assign SubscriptStore NameLoad Index SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Slice Num Assign AttributeStore NameLoad attr NameLoad Assign NameStore Dict Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args NameParam defaults body Raise NameLoad BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr decorator_list For NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body If CompareNotIn NameLoad AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad For NameStore AttributeLoad NameLoad attr body For NameStore NameLoad body If CompareNotIn NameLoad AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Slice orelse Assign NameStore ListLoad If CompareNotIn NameLoad AttributeLoad NameLoad attr body If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Return Str Assign NameStore ListLoad For NameStore NameLoad body If CompareEq Call NameLoad NameLoad Num body Expr Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad orelse Expr Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad Return BinOpMod Str Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict For NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body TryExcept body If CompareNotEq SubscriptLoad NameLoad Index Num NameLoad body Assign SubscriptStore NameLoad Index SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num handlers ExceptHandler type NameLoad body Pass Assign NameStore Dict For NameStore AttributeLoad NameLoad attr body For TupleStore NameStore NameStore Call NameLoad NameLoad body Assign NameStore ListLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Slice BinOpAdd NameLoad Num For NameStore SubscriptLoad NameLoad Slice body If CompareIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad If CompareIn NameLoad NameLoad body Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr NameLoad orelse Assign SubscriptStore NameLoad Index NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore BinOpMod Str NameLoad orelse Assign NameStore BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareNotEq NameLoad NameLoad body Assign NameStore BinOpAdd Str NameLoad orelse Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore BinOpMod Str NameLoad If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad orelse Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIn NameLoad AttributeLoad NameLoad attr body Assign NameStore Str orelse Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIn NameLoad AttributeLoad NameLoad attr body If Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad body Assign NameStore Call SubscriptLoad AttributeLoad NameLoad attr Index NameLoad orelse Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Return BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareIn NameLoad AttributeLoad NameLoad attr body Return BinOpMod Str Call AttributeLoad NameLoad attr NameLoad Return Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIn NameLoad AttributeLoad NameLoad attr body Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIn NameLoad AttributeLoad NameLoad attr body Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad TryExcept body Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index Num handlers ExceptHandler type NameLoad body TryExcept body Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index Num handlers ExceptHandler type NameLoad body Assign NameStore NameLoad If CompareIsNot NameLoad NameLoad body Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr BinOpMod Str NameLoad NameLoad If NameLoad body Assign NameStore Call NameLoad NameLoad If CompareIsNot NameLoad NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad TryExcept body Return BoolOpOr SubscriptLoad NameLoad Index Num NameLoad handlers ExceptHandler type NameLoad body Pass decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad Str Assign NameStore Dict For NameStore Call AttributeLoad NameLoad attr body If CompareEq Call NameLoad NameLoad Num body Assign SubscriptStore NameLoad Index SubscriptLoad NameLoad Index NameLoad NameLoad Delete SubscriptDel NameLoad Index NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Str Str If CompareIn NameLoad AttributeLoad NameLoad attr body Continue Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad If CompareIn NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr If CompareEq NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad NameLoad NameLoad NameLoad NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad ListLoad NameLoad NameLoad NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad ListLoad NameLoad NameLoad NameLoad orelse If CompareEq NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad NameLoad NameLoad NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad ListLoad NameLoad NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad ListLoad NameLoad NameLoad NameLoad orelse Raise NameLoad BinOpMod Str TupleLoad NameLoad decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Return NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore NameLoad TryExcept body If BoolOpAnd CompareNotEq SubscriptLoad NameLoad Index Num Str UnaryOpNot Call AttributeLoad SubscriptLoad NameLoad Index Num attr body Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Num attr orelse If BoolOpAnd CompareNotEq SubscriptLoad NameLoad Index Num Str UnaryOpNot Call AttributeLoad SubscriptLoad NameLoad Index Num attr body Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Num attr handlers ExceptHandler type NameLoad body Pass Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Str Return SubscriptLoad NameLoad Slice NameLoad handlers ExceptHandler type NameLoad body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return SubscriptLoad Call AttributeLoad NameLoad attr NameLoad Slice Num decorator_list FunctionDef arguments args defaults body Expr Str TryExcept body Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Return NameLoad handlers ExceptHandler body Pass decorator_list Assign NameStore ListLoad TupleLoad Str Str Str TupleLoad Str Str Str TupleLoad Str Str Str TupleLoad Str Str Str TupleLoad Str Str Str TupleLoad Str Str Str TupleLoad Str Str Str TupleLoad Str Str Str TupleLoad Str Str Str TupleLoad Str Str Str TupleLoad Str Str Str TupleLoad Str Str Str TupleLoad Str Str Str Assign NameStore Dict Str Str NameLoad NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore ListLoad For TupleStore NameStore NameStore NameStore NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Continue TryExcept body Assign NameStore Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call Call NameLoad NameLoad NameLoad If CompareIn NameLoad NameLoad body Assign NameStore Call SubscriptLoad NameLoad Index NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr orelse Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Continue Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpAdd Str NameLoad Str decorator_list FunctionDef arguments args defaults body Assign NameStore Call NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Slice Num handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Print NameLoad Print Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num If SubscriptLoad NameLoad Index Str body Import alias Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str Str Assign NameStore Call NameLoad NameLoad orelse Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str For TupleStore NameStore NameStore NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpAdd Call NameLoad NameLoad Str If NameLoad body Expr Call AttributeLoad NameLoad attr Num decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A 
Rebuild the completion functions for the currently active version of Twisted::
    $ python zshcomp.py -i

This module implements a zsh code generator which generates completion code for
commands that use twisted.python.usage. This is the stuff that makes pressing
Tab at the command line work.

Maintainer: Eric Mangold

To build completion functions for your own commands, and not Twisted commands,
then just do something like this::

    o = mymodule.MyOptions()
    f = file('_mycommand', 'w')
    Builder("mycommand", o, f).write()

Then all you have to do is place the generated file somewhere in your
C{$fpath}, and restart zsh. Note the "site-functions" directory in your
C{$fpath} where you may install 3rd-party completion functions (like the one
you're building). Call C{siteFunctionsPath} to locate this directory
programmatically.

SPECIAL CLASS VARIABLES. You may set these on your usage.Options subclass::

    zsh_altArgDescr
    zsh_multiUse
    zsh_mutuallyExclusive
    zsh_actions
    zsh_actionDescr
    zsh_extras

Here is what they mean (with examples)::

    zsh_altArgDescr = {"foo":"use this description for foo instead"}
        A dict mapping long option names to alternate descriptions.  When this
        variable is present, the descriptions contained here will override
        those descriptions provided in the optFlags and optParameters
        variables.

    zsh_multiUse = ["foo", "bar"]
        A sequence containing those long option names which may appear on the
        command line more than once. By default, options will only be completed
        one time.

    zsh_mutuallyExclusive = [("foo", "bar"), ("bar", "baz")]
        A sequence of sequences, with each sub-sequence containing those long
        option names that are mutually exclusive. That is, those options that
        cannot appear on the command line together.

    zsh_actions = {"foo":'_files -g "*.foo"', "bar":"(one two three)",
            "colors":"_values -s , 'colors to use' red green blue"}
        A dict mapping long option names to Zsh "actions". These actions
        define what will be completed as the argument to the given option.  By
        default, all files/dirs will be completed if no action is given.

        Callables may instead be given for the values in this dict. The
        callable should accept no arguments, and return a string that will be
        used as the zsh "action" in the same way as the literal strings in the
        examples above.

        As you can see in the example above. The "foo" option will have files
        that end in .foo completed when the user presses Tab. The "bar"
        option will have either of the strings "one", "two", or "three"
        completed when the user presses Tab.

        "colors" will allow multiple arguments to be completed, seperated by
        commas. The possible arguments are red, green, and blue. Examples::

            my_command --foo some-file.foo --colors=red,green
            my_command --colors=green
            my_command --colors=green,blue

        Actions may take many forms, and it is beyond the scope of this
        document to illustrate them all. Please refer to the documention for
        the Zsh _arguments function. zshcomp is basically a front-end to Zsh's
        _arguments completion function.

        That documentation is available on the zsh web site at this URL:
        U{http://zsh.sunsite.dk/Doc/Release/zsh_19.html#SEC124}

    zsh_actionDescr = {"logfile":"log file name", "random":"random seed"}
        A dict mapping long option names to a description for the corresponding
        zsh "action". These descriptions are show above the generated matches
        when the user is doing completions for this option.

        Normally Zsh does not show these descriptions unless you have
        "verbose" completion turned on. Turn on verbosity with this in your
        ~/.zshrc::

            zstyle ':completion:*' verbose yes
            zstyle ':completion:*:descriptions' format '%B%d%b'

    zsh_extras = [":file to read from:action", ":file to write to:action"]
        A sequence of extra arguments that will be passed verbatim to Zsh's
        _arguments completion function. The _arguments function does all the
        hard work of doing command line completions. You can see how zshcomp
        invokes the _arguments call by looking at the generated completion
        files that this module creates.

   *** NOTE ***

        You will need to use this variable to describe completions for normal
        command line arguments. That is, those arguments that are not
        associated with an option. That is, the arguments that are given to the
        parseArgs method of your usage.Options subclass.

        In the example above, the 1st non-option argument will be described as
        "file to read from" and completion options will be generated in
        accordance with the "action". (See above about zsh "actions") The
        2nd non-option argument will be described as "file to write to" and
        the action will be interpreted likewise.

        Things you can put here are all documented under the _arguments
        function here: U{http://zsh.sunsite.dk/Doc/Release/zsh_19.html#SEC124}

Zsh Notes:

To enable advanced completion add something like this to your ~/.zshrc::

    autoload -U compinit
    compinit

For some extra verbosity, and general niceness add these lines too::

    zstyle ':completion:*' verbose yes
    zstyle ':completion:*:descriptions' format '%B%d%b'
    zstyle ':completion:*:messages' format '%d'
    zstyle ':completion:*:warnings' format 'No matches for: %d'

Have fun!
 N/A warnings N/A N/A N/A warnings warn zshcomp is deprecated as of Twisted 11.1. Shell tab-completion is now handled by twisted.python.usage. DeprecationWarning stacklevel 2 N/A itertools sys commands os.path twisted.python reflect util usage twisted.application.service IServiceMaker MyOptions N/A N/A usage Options N/A N/A 
    Options for this file
     N/A longdesc N/A synopsis Usage: python zshcomp.py [--install | -i] | <output directory> N/A optFlags N/A N/A install i Output files to the "installation" directory (twisted/python/zsh in the currently active Twisted package) N/A optParameters N/A N/A directory d None Output files to this directory postOptions N/A N/A self N/A N/A N/A N/A N/A self N/A install N/A self N/A directory N/A N/A N/A usage UsageError Can't have --install and --directory at the same time N/A N/A N/A N/A self N/A install N/A N/A self N/A directory N/A N/A N/A usage UsageError Not enough arguments N/A N/A N/A self N/A directory N/A N/A N/A N/A os path isdir N/A self N/A directory N/A N/A N/A usage UsageError N/A %s is not a directory N/A self N/A directory N/A N/A Builder N/A N/A __init__ N/A N/A self cmd_name options file N/A N/A N/A 
        @type cmd_name: C{str}
        @param cmd_name: The name of the command

        @type options: C{twisted.usage.Options}
        @param options: The C{twisted.usage.Options} instance defined for
                        this command

        @type file: C{file}
        @param file: The C{file} to write the completion function to
         N/A N/A self cmd_name cmd_name N/A N/A self options options N/A N/A self file file N/A write N/A N/A self N/A N/A N/A 
        Write the completion function to the file given to __init__
        @return: C{None}
         N/A N/A N/A N/A self file write N/A #compdef %s
 N/A N/A self cmd_name N/A gen N/A ArgumentsGenerator N/A self cmd_name N/A self options N/A self file N/A N/A N/A gen write N/A N/A SubcommandBuilder N/A Builder N/A N/A 
    Use this builder for commands that have sub-commands. twisted.python.usage
    has the notion of sub-commands that are defined using an entirely seperate
    Options class.
     N/A interface None N/A subcmdLabel None write N/A N/A self N/A N/A N/A 
        Write the completion function to the file given to __init__
        @return: C{None}
         N/A N/A N/A N/A self file write N/A #compdef %s
 N/A N/A self cmd_name N/A N/A N/A N/A self file write local _zsh_subcmds_array
_zsh_subcmds_array=(
 twisted plugin newplugin N/A plugins N/A N/A newplugin getPlugins N/A self interface N/A p plugins N/A N/A N/A N/A N/A self file write N/A "%s:%s"
 N/A N/A p tapname N/A p description N/A N/A N/A N/A self file write )

 N/A N/A N/A N/A self options __class__ zsh_extras N/A *::subcmd:->subcmd N/A gen N/A ArgumentsGenerator N/A self cmd_name N/A self options N/A self file N/A N/A N/A gen write N/A N/A N/A N/A self file write N/A if (( CURRENT == 1 )); then
  _describe "%s" _zsh_subcmds_array && ret=0
fi
(( ret )) || return 0

service="$words[1]"

case $service in
 N/A N/A self subcmdLabel N/A plugins N/A N/A newplugin getPlugins N/A self interface N/A p plugins N/A N/A N/A N/A N/A self file write N/A N/A p tapname )
 N/A gen N/A ArgumentsGenerator N/A p tapname N/A N/A p options N/A self file N/A N/A N/A gen write N/A N/A N/A N/A self file write ;;
 N/A N/A N/A N/A self file write *) _message "don't know how to complete $service";;
esac N/A N/A MktapBuilder N/A SubcommandBuilder N/A N/A 
    Builder for the mktap command
     N/A interface IServiceMaker N/A subcmdLabel tap to build N/A TwistdBuilder N/A SubcommandBuilder N/A N/A 
    Builder for the twistd command
     N/A interface IServiceMaker N/A subcmdLabel service to run N/A ArgumentsGenerator N/A N/A N/A 
    Generate a call to the zsh _arguments completion function
    based on data in a usage.Options subclass
     __init__ N/A N/A self cmd_name options file N/A N/A N/A 
        @type cmd_name: C{str}
        @param cmd_name: The name of the command

        @type options: C{twisted.usage.Options}
        @param options: The C{twisted.usage.Options} instance defined
                        for this command

        @type file: C{file}
        @param file: The C{file} to write the completion function to
         N/A N/A self cmd_name cmd_name N/A N/A self options options N/A N/A self file file N/A N/A self altArgDescr N/A N/A N/A self actionDescr N/A N/A N/A self multiUse N/A N/A N/A self mutuallyExclusive N/A N/A N/A self actions N/A N/A N/A self extras N/A N/A aCL N/A reflect accumulateClassList N/A aCD N/A reflect accumulateClassDict N/A N/A aCD N/A options __class__ zsh_altArgDescr N/A self altArgDescr N/A N/A aCD N/A options __class__ zsh_actionDescr N/A self actionDescr N/A N/A aCL N/A options __class__ zsh_multiUse N/A self multiUse N/A N/A aCL N/A options __class__ zsh_mutuallyExclusive N/A self mutuallyExclusive N/A N/A aCD N/A options __class__ zsh_actions N/A self actions N/A N/A aCL N/A options __class__ zsh_extras N/A self extras N/A optFlags N/A N/A optParams N/A N/A N/A aCL N/A options __class__ optFlags optFlags N/A N/A aCL N/A options __class__ optParameters optParams N/A N/A i optList N/A enumerate optFlags N/A N/A N/A N/A len optList 3 N/A N/A N/A optFlags N/A i N/A N/A util padTo 3 optList N/A N/A i optList N/A enumerate optParams N/A N/A N/A N/A len optList 4 N/A N/A N/A optParams N/A i N/A N/A util padTo 4 optList N/A N/A self optFlags optFlags N/A N/A self optParams optParams N/A optParams_d N/A N/A optList optParams N/A N/A N/A optParams_d N/A N/A optList N/A 0 N/A optList N/A 1 N/A N/A self optParams_d optParams_d N/A optFlags_d N/A N/A optList optFlags N/A N/A N/A optFlags_d N/A N/A optList N/A 0 N/A optList N/A 1 N/A N/A self optFlags_d optFlags_d N/A optAll_d N/A N/A N/A N/A optAll_d update optParams_d N/A N/A N/A optAll_d update optFlags_d N/A N/A self optAll_d optAll_d N/A N/A N/A self addAdditionalOptions N/A N/A N/A self verifyZshNames N/A N/A self excludes N/A N/A self makeExcludesDict N/A write N/A N/A self N/A N/A N/A 
        Write the zsh completion code to the file given to __init__
        @return: C{None}
         N/A N/A N/A self writeHeader N/A N/A N/A self writeExtras N/A N/A N/A self writeOptions N/A N/A N/A self writeFooter N/A writeHeader N/A N/A self N/A N/A N/A 
        This is the start of the code that calls _arguments
        @return: C{None}
         N/A N/A N/A N/A self file write _arguments -s -A "-*" \
 N/A writeOptions N/A N/A self N/A N/A N/A 
        Write out zsh code for each option in this command
        @return: C{None}
         N/A optNames N/A N/A N/A self optAll_d keys N/A N/A N/A optNames sort N/A longname optNames N/A N/A N/A N/A self writeOpt longname N/A writeExtras N/A N/A self N/A N/A N/A 
        Write out the "extras" list. These are just passed verbatim to the
        _arguments call
        @return: C{None}
         N/A s N/A self extras N/A N/A N/A N/A N/A self file write N/A escape s N/A N/A N/A N/A self file write  \
 N/A writeFooter N/A N/A self N/A N/A N/A 
        Write the last bit of code that finishes the call to _arguments
        @return: C{None}
         N/A N/A N/A N/A self file write && return 0
 N/A verifyZshNames N/A N/A self N/A N/A N/A 
        Ensure that none of the names given in zsh_* variables are typoed
        @return: C{None}
        @raise ValueError: Raised if unknown option names have been given in
                           zsh_* variables
         err N/A N/A name N/A N/A N/A ValueError N/A Unknown option name "%s" found while
examining zsh_ attributes for the %s command N/A name N/A self cmd_name N/A N/A name N/A N/A itertools chain N/A self altArgDescr N/A self actionDescr N/A self actions N/A self multiUse N/A N/A N/A name N/A self optAll_d N/A N/A N/A err name N/A seq N/A self mutuallyExclusive N/A N/A name seq N/A N/A N/A name N/A self optAll_d N/A N/A N/A err name N/A excludeStr N/A N/A self longname buildShort N/A False N/A N/A 
        Generate an "exclusion string" for the given option

        @type longname: C{str}
        @param longname: The long name of the option
                         (i.e. "verbose" instead of "v")

        @type buildShort: C{bool}
        @param buildShort: May be True to indicate we're building an excludes
                           string for the short option that correspondes to
                           the given long opt

        @return: The generated C{str}
         N/A N/A longname N/A self excludes N/A N/A exclusions N/A N/A N/A self excludes N/A longname N/A N/A N/A exclusions N/A N/A N/A longname N/A self multiUse N/A N/A N/A buildShort False N/A N/A short N/A N/A self getShortOption longname N/A N/A short None N/A N/A N/A N/A exclusions append short N/A N/A N/A N/A exclusions append longname N/A N/A exclusions N/A N/A N/A strings N/A N/A optName exclusions N/A N/A N/A N/A len optName 1 N/A N/A N/A N/A strings append N/A - optName N/A N/A N/A N/A strings append N/A -- optName N/A N/A (%s) N/A N/A join strings N/A makeExcludesDict N/A N/A self N/A N/A N/A 
        @return: A C{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)
         N/A longToShort N/A N/A optList N/A N/A itertools chain N/A self optParams N/A self optFlags N/A N/A N/A N/A N/A N/A optList N/A 1 None N/A N/A N/A longToShort N/A N/A optList N/A 0 N/A optList N/A 1 N/A N/A N/A IndexError N/A N/A N/A excludes N/A N/A lst N/A self mutuallyExclusive N/A N/A N/A i longname N/A enumerate lst N/A N/A tmp N/A N/A N/A N/A tmp extend N/A lst N/A i N/A N/A N/A tmp extend N/A lst N/A N/A i 1 N/A name N/A tmp N/A N/A N/A N/A name longToShort N/A N/A N/A N/A tmp append N/A longToShort N/A name N/A N/A longname excludes N/A N/A N/A N/A N/A excludes N/A longname extend tmp N/A N/A N/A excludes N/A longname tmp N/A excludes N/A writeOpt N/A N/A self longname N/A N/A N/A 
        Write out the zsh code for the given argument. This is just part of the
        one big call to _arguments

        @type longname: C{str}
        @param longname: The long name of the option
            (i.e. "verbose" instead of "v")

        @return: C{None}
         N/A N/A longname N/A self optFlags_d N/A N/A long_field N/A --%s longname N/A N/A long_field N/A --%s= longname N/A short N/A N/A self getShortOption longname N/A N/A short None N/A N/A short_field N/A - short N/A N/A short_field N/A descr N/A N/A self getDescription longname N/A descr_field N/A N/A descr replace [ \[ N/A descr_field N/A N/A descr_field replace ] \] N/A descr_field N/A [%s] descr_field N/A N/A longname N/A self actionDescr N/A N/A actionDescr_field N/A N/A self actionDescr N/A longname N/A N/A actionDescr_field descr N/A action_field N/A N/A self getAction longname N/A N/A longname N/A self multiUse N/A N/A multi_field * N/A N/A multi_field N/A longExclusions_field N/A N/A self excludeStr longname N/A short N/A N/A shortExclusions_field N/A N/A self excludeStr longname buildShort True N/A N/A N/A N/A self file write N/A escape N/A %s%s%s%s%s N/A shortExclusions_field multi_field short_field descr_field action_field N/A N/A N/A N/A self file write  \
 N/A N/A N/A N/A self file write N/A escape N/A %s%s%s%s%s N/A longExclusions_field multi_field long_field descr_field action_field N/A N/A N/A N/A self file write  \
 N/A getAction N/A N/A self longname N/A N/A N/A 
        Return a zsh "action" string for the given argument
        @return: C{str}
         N/A N/A longname N/A self actions N/A N/A N/A callable N/A N/A self actions N/A longname N/A N/A action N/A N/A N/A self actions N/A longname N/A N/A action N/A N/A self actions N/A longname N/A N/A :%s:%s N/A N/A N/A self getActionDescr longname action N/A N/A longname N/A self optParams_d N/A N/A N/A :%s:_files N/A N/A self getActionDescr longname N/A N/A getActionDescr N/A N/A self longname N/A N/A N/A 
        Return the description to be used when this argument is completed
        @return: C{str}
         N/A N/A longname N/A self actionDescr N/A N/A N/A N/A self actionDescr N/A longname N/A N/A longname N/A getDescription N/A N/A self longname N/A N/A N/A 
        Return the description to be used for this argument
        @return: C{str}
         N/A N/A longname N/A self altArgDescr N/A N/A N/A N/A self altArgDescr N/A longname N/A N/A N/A descr N/A N/A N/A self optFlags_d N/A longname N/A 1 N/A N/A N/A KeyError N/A N/A N/A N/A descr N/A N/A N/A self optParams_d N/A longname N/A 2 N/A N/A N/A KeyError N/A N/A descr None N/A N/A descr None N/A N/A descr N/A longMangled N/A N/A longname replace - _ N/A obj N/A getattr N/A self options N/A opt_%s longMangled None N/A obj N/A N/A descr N/A descrFromDoc obj N/A N/A descr None N/A N/A descr N/A longname N/A getShortOption N/A N/A self longname N/A N/A N/A 
        Return the short option letter or None
        @return: C{str} or C{None}
         N/A optList N/A N/A self optAll_d N/A longname N/A N/A N/A N/A N/A optList N/A 0 None N/A N/A N/A IndexError N/A N/A N/A addAdditionalOptions N/A N/A self N/A N/A N/A 
        Add additional options to the optFlags and optParams lists.
        These will be defined by 'opt_foo' methods of the Options subclass
        @return: C{None}
         N/A methodsDict N/A N/A N/A N/A reflect accumulateMethods N/A self options methodsDict opt_ N/A methodToShort N/A N/A name N/A N/A methodsDict copy N/A N/A N/A N/A len name 1 N/A N/A N/A methodToShort N/A N/A methodsDict N/A name name N/A N/A methodsDict N/A name N/A N/A methodName methodObj N/A N/A methodsDict items N/A N/A longname N/A N/A methodName replace _ - N/A N/A longname N/A self optAll_d N/A N/A N/A descr N/A N/A self getDescription longname N/A short None N/A N/A methodObj methodToShort N/A N/A short N/A methodToShort N/A methodObj N/A reqArgs N/A N/A N/A methodObj im_func func_code co_argcount N/A N/A reqArgs 2 N/A N/A N/A N/A N/A self optParams append N/A longname short None descr N/A N/A N/A self optParams_d N/A longname N/A short None descr N/A N/A N/A self optAll_d N/A longname N/A short None descr N/A N/A N/A reqArgs 1 N/A N/A N/A N/A N/A self optFlags append N/A longname short descr N/A N/A N/A self optFlags_d N/A longname N/A short descr N/A N/A N/A self optAll_d N/A longname N/A short None descr N/A N/A TypeError N/A %r has wrong number of arguments N/A methodObj N/A N/A descrFromDoc N/A N/A obj N/A N/A N/A 
    Generate an appropriate description from docstring of the given object
     N/A N/A N/A obj __doc__ None N/A N/A None N/A lines N/A N/A N/A obj __doc__ split N/A descr None N/A N/A N/A N/A N/A N/A lines N/A 0 N/A N/A N/A N/A lines N/A 0 isspace N/A N/A descr N/A N/A N/A lines N/A 0 lstrip N/A N/A N/A N/A N/A lines N/A 1 N/A N/A N/A N/A lines N/A 1 isspace N/A N/A descr N/A N/A N/A lines N/A 1 lstrip N/A N/A N/A IndexError N/A N/A N/A descr N/A firstLine N/A N/A s N/A N/A N/A 
    Return the first line of the given string
     N/A N/A N/A i N/A N/A s index N/A N/A s N/A i N/A N/A N/A ValueError N/A N/A s N/A escape N/A N/A str N/A N/A N/A 
    Shell escape the given string
     N/A N/A N/A N/A commands mkarg str N/A 1 N/A siteFunctionsPath N/A N/A N/A N/A N/A 
    Return the path to the system-wide site-functions directory or
    C{None} if it cannot be determined
     N/A N/A N/A cmd zsh -f -c 'echo ${(M)fpath:#/*/site-functions}' N/A output N/A N/A commands getoutput cmd N/A N/A N/A N/A os path isdir output N/A N/A output N/A N/A N/A N/A N/A N/A generateFor N/A N/A conch twisted.conch.scripts.conch ClientOptions N/A mktap twisted.scripts.mktap FirstPassOptions N/A trial twisted.scripts.trial Options N/A cftp twisted.conch.scripts.cftp ClientOptions N/A tapconvert twisted.scripts.tapconvert ConvertOptions N/A twistd twisted.scripts.twistd ServerOptions N/A ckeygen twisted.conch.scripts.ckeygen GeneralOptions N/A lore twisted.lore.scripts.lore Options N/A pyhtmlizer twisted.scripts.htmlizer Options N/A tap2deb twisted.scripts.tap2deb MyOptions N/A tkconch twisted.conch.scripts.tkconch GeneralOptions N/A manhole twisted.scripts.manhole MyOptions N/A tap2rpm twisted.scripts.tap2rpm MyOptions N/A specialBuilders N/A mktap twistd MktapBuilder TwistdBuilder makeCompFunctionFiles N/A N/A out_path generateFor specialBuilders N/A generateFor specialBuilders N/A N/A 
    Generate completion function files in the given directory for all
    twisted commands

    @type out_path: C{str}
    @param out_path: The path to the directory to generate completion function
                     fils in

    @param generateFor: Sequence in the form of the 'generateFor' top-level
                        variable as defined in this module. Indicates what
                        commands to build completion files for.

    @param specialBuilders: Sequence in the form of the 'specialBuilders'
                            top-level variable as defined in this module.
                            Indicates what commands require a special
                            Builder class.

    @return: C{list} of 2-tuples of the form (cmd_name, error) indicating
             commands that we skipped building completions for. cmd_name
             is the name of the skipped command, and error is the Exception
             that was raised when trying to import the script module.
             Commands are usually skipped due to a missing dependency,
             e.g. Tkinter.
     N/A skips N/A N/A N/A cmd_name module_name class_name generateFor N/A N/A N/A module_name None N/A N/A f N/A _openCmdFile out_path cmd_name N/A N/A N/A f close N/A N/A N/A N/A m N/A __import__ N/A %s N/A module_name None None class_name N/A f N/A _openCmdFile out_path cmd_name N/A o N/A N/A getattr m class_name N/A N/A cmd_name specialBuilders N/A N/A b N/A N/A specialBuilders N/A cmd_name cmd_name o f N/A N/A N/A b write N/A N/A b N/A Builder cmd_name o f N/A N/A N/A b write N/A N/A N/A Exception N/A e N/A N/A N/A N/A skips append N/A cmd_name e N/A N/A skips N/A _openCmdFile N/A N/A out_path cmd_name N/A N/A N/A N/A file N/A N/A N/A os path join out_path N/A _ cmd_name w N/A run N/A N/A N/A N/A N/A options N/A MyOptions N/A N/A N/A N/A N/A options parseOptions N/A N/A sys argv N/A 1 N/A N/A N/A N/A usage UsageError N/A e N/A N/A e N/A N/A N/A options getUsage N/A N/A N/A sys exit 2 N/A N/A options N/A install N/A N/A twisted N/A dir N/A N/A N/A os path join N/A N/A N/A os path dirname N/A twisted __file__ python zsh N/A skips N/A makeCompFunctionFiles dir N/A N/A skips N/A makeCompFunctionFiles N/A options N/A directory N/A N/A cmd_name error skips N/A N/A N/A N/A N/A sys stderr write N/A zshcomp: Skipped building for %s. Script module could not be imported:
 N/A cmd_name N/A N/A N/A N/A sys stderr write N/A N/A str error N/A skips N/A N/A N/A N/A sys exit 3 N/A N/A N/A __name__ __main__ N/A N/A N/A run