From 44d97848e502fe999acdfb680c72b72ca6033b17 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sun, 31 Dec 2017 17:31:21 +0100 Subject: [PATCH] parse commands in posix mode If posix=False, quotes are not stripped from parsed tokens. --- mitmproxy/command.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mitmproxy/command.py b/mitmproxy/command.py index 7bb2bf8e9..48968c905 100644 --- a/mitmproxy/command.py +++ b/mitmproxy/command.py @@ -24,7 +24,7 @@ def verify_arg_signature(f: typing.Callable, args: list, kwargs: dict) -> None: def lexer(s): # mypy mis-identifies shlex.shlex as abstract - lex = shlex.shlex(s) # type: ignore + lex = shlex.shlex(s, posix=True) # type: ignore lex.wordchars += "." lex.whitespace_split = True lex.commenters = ''