def _parse_command(c):
    class NoArgs(Exception):
        pass

    try:
        if not c.optargs2:
            raise NoArgs()
        arg_count = int(c.optargs2)
        has_opt = bool(c.optargs2a)
        s = c.args
        if has_opt:
            s += "[{0}]".format(c.optargs2a)
            arg_count -= 1
        elif arg_count == 0:
            raise NoArgs()
        s += "{arg}" * arg_count
        comp = command_to_snippet(s)
        if comp is None:
            raise NoArgs()
        comp = comp[1]
    except:  # no args
        s = c.args + "{}"
        comp = s

    s = s.ljust(50)
    return (s + "\tlocal", comp)
def _parse_command(c):
    class NoArgs(Exception):
        pass

    try:
        if not c.optargs2:
            raise NoArgs()
        arg_count = int(c.optargs2)
        has_opt = bool(c.optargs2a)
        s = c.args
        if has_opt:
            s += "[{0}]".format(c.optargs2a)
            arg_count -= 1
        elif arg_count == 0:
            raise NoArgs()
        s += "{arg}" * arg_count
        comp = command_to_snippet(s)
        if comp is None:
            raise NoArgs()
        comp = comp[1]
    except:  # no args
        s = c.args + "{}"
        comp = s

    s = s.ljust(50)
    return (s + "\tlocal", comp)
def parse_line_as_command(line):
    return command_to_snippet(line)
def parse_line_as_command(line):
    return command_to_snippet(line)