示例#1
0
def kitten_parse(func: str, rest: str) -> FuncArgsType:
    if func == 'kitten':
        args = rest.split(maxsplit=1)
    else:
        args = rest.split(maxsplit=2)[1:]
        func = 'kitten'
    return func, [args[0]] + (to_cmdline(args[1]) if len(args) > 1 else [])
示例#2
0
def shlex_parse(func: str, rest: str) -> FuncArgsType:
    return func, to_cmdline(rest)