summaryrefslogtreecommitdiff
path: root/alot/helper.py
diff options
context:
space:
mode:
authorYann Rouillard <yann@pleiades.fr.eu.org>2013-07-03 00:07:49 +0200
committerYann Rouillard <yann@pleiades.fr.eu.org>2013-07-03 00:17:47 +0200
commit083f02df97906c9000a7f8da29aff97f5751fc1c (patch)
tree0f2305bc1a419296fc3014acafeda3236df126da /alot/helper.py
parentbc4717f11575055ad368cfd8caa0e704baf32e74 (diff)
fix command line escaping for arguments containing spaces
Diffstat (limited to 'alot/helper.py')
-rw-r--r--alot/helper.py3
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