diff options
author | Yann Rouillard <yann@pleiades.fr.eu.org> | 2013-07-03 00:07:49 +0200 |
---|---|---|
committer | Yann Rouillard <yann@pleiades.fr.eu.org> | 2013-07-03 00:17:47 +0200 |
commit | 083f02df97906c9000a7f8da29aff97f5751fc1c (patch) | |
tree | 0f2305bc1a419296fc3014acafeda3236df126da /alot/helper.py | |
parent | bc4717f11575055ad368cfd8caa0e704baf32e74 (diff) |
fix command line escaping for arguments containing spaces
Diffstat (limited to 'alot/helper.py')
-rw-r--r-- | alot/helper.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/alot/helper.py b/alot/helper.py index 1dd6968a..8ce9c725 100644 --- a/alot/helper.py +++ b/alot/helper.py @@ -27,7 +27,8 @@ def split_commandline(s, comments=False, posix=True): """ splits semi-colon separated commandlines """ - # shlex seems to remove unescaped quotes + # shlex seems to remove unescaped quotes and backslashes + s = s.replace('\\', '\\\\') s = s.replace('\'', '\\\'') s = s.replace('\"', '\\\"') # encode s to utf-8 for shlex |