diff options
author | mathieui <mathieui@mathieui.net> | 2011-05-10 00:47:41 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2011-05-10 00:47:41 +0200 |
commit | 6e58f88d051067c2a833d53343fa6d27d58213f7 (patch) | |
tree | 182961a49c7dfc2c7bd9da82e67952f4f13ae243 /src/common.py | |
parent | bc67a7d6548443aec9568fda56187978c64736a8 (diff) | |
download | poezio-6e58f88d051067c2a833d53343fa6d27d58213f7.tar.gz poezio-6e58f88d051067c2a833d53343fa6d27d58213f7.tar.bz2 poezio-6e58f88d051067c2a833d53343fa6d27d58213f7.tar.xz poezio-6e58f88d051067c2a833d53343fa6d27d58213f7.zip |
Fix the /version command in mucs (and globaaly) & improve shlex parsing
Diffstat (limited to 'src/common.py')
-rw-r--r-- | src/common.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/common.py b/src/common.py index 03c9b6a4..6a9d4a9c 100644 --- a/src/common.py +++ b/src/common.py @@ -194,7 +194,9 @@ def datetime_tuple(timestamp): return ret def shell_split(string): - sh = shlex.shlex(string, posix=True) + sh = shlex.shlex(string, posix=False) + sh.whitespace_split = True + sh.quotes = '"' ret = list() try: w = sh.get_token() @@ -203,7 +205,7 @@ def shell_split(string): w = sh.get_token() return ret except ValueError: - return string.split() + return string.split(" ") def curses_color_pair(color): if color < 0: |