def cli_plugin_add_argument(*args, **kwargs):
def decorator(func):<EOL><INDENT>if not isinstance(func, CLIPluginFuncWrapper):<EOL><INDENT>func = CLIPluginFuncWrapper(do_run=func)<EOL><DEDENT>func.add_argument(*args, **kwargs)<EOL>return func<EOL><DEDENT>return decorator<EOL>
Decorator generator that adds an argument to the cli plugin based on the
decorated function

Args:
    *args: Any args to be passed to
        :func:`argparse.ArgumentParser.add_argument`
    *kwargs: Any keyword args to be passed to
        :func:`argparse.ArgumentParser.add_argument`


Returns:
    function: Decorator that builds or extends the cliplugin for the
        decorated function, adding the given argument definition

Examples:
    >>> @cli_plugin_add_argument('-m', '--mogambo', action='store_true')
    ... def test(**kwargs):
    ...     print 'test'
    ...
    >>> print test.__class__
    <class 'cli.CLIPluginFuncWrapper'>
    >>> print test._parser_args
    [(('-m', '--mogambo'), {'action': 'store_true'})]

    >>> @cli_plugin_add_argument('-m', '--mogambo', action='store_true')
    ... @cli_plugin_add_argument('-b', '--bogabmo', action='store_false')
    ... @cli_plugin
    ... def test(**kwargs):
    ...     print 'test'
    ...
    >>> print test.__class__
    <class 'cli.CLIPluginFuncWrapper'>
    >>> print test._parser_args # doctest: +NORMALIZE_WHITESPACE
    [(('-b', '--bogabmo'), {'action': 'store_false'}),
     (('-m', '--mogambo'), {'action': 'store_true'})]