diff options
author | mathieui <mathieui@mathieui.net> | 2014-04-28 00:20:57 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2014-04-28 00:20:57 +0200 |
commit | 069283e349b2e8dd324446aa5c30253a0993f1a3 (patch) | |
tree | 23433948b69cce0e41b5f32acd8fa8d30b19fb50 /src/common.py | |
parent | 31716565a74bcc3c41569297c4c8ddfe731ba364 (diff) | |
download | poezio-069283e349b2e8dd324446aa5c30253a0993f1a3.tar.gz poezio-069283e349b2e8dd324446aa5c30253a0993f1a3.tar.bz2 poezio-069283e349b2e8dd324446aa5c30253a0993f1a3.tar.xz poezio-069283e349b2e8dd324446aa5c30253a0993f1a3.zip |
Don’t escape backslashes unless we are inside a quoted string and the next char is a quote
Sadly, we can’t doctest stuff with backslashes because it drives doctest
crazy.
Diffstat (limited to 'src/common.py')
-rw-r--r-- | src/common.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common.py b/src/common.py index e9fe05c8..20700258 100644 --- a/src/common.py +++ b/src/common.py @@ -319,6 +319,8 @@ def shell_split(st): ['toto', 'titi'] >>> shell_split('toto ""') ['toto', ''] + >>> shell_split('to"to titi "a" b') + ['to"to', 'titi', 'a', 'b'] >>> shell_split('"toto titi" toto ""') ['toto titi', 'toto', ''] >>> shell_split('toto "titi') |