aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/auto-auto-complete.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/auto-auto-complete.py b/src/auto-auto-complete.py
index 8637fe0..da8d56f 100755
--- a/src/auto-auto-complete.py
+++ b/src/auto-auto-complete.py
@@ -718,7 +718,9 @@ class GeneratorZSH:
continue
buf += ' \'(%s)\'{%s}' % (' '.join(options), ','.join(options))
if 'desc' in item:
- buf += '"["%s"]"' % verb(' '.join(item['desc']))
+ desc = ' '.join(item['desc'])
+ desc = desc.replace('\\', '\\\\').replace('[', '\\[').replace(']', '\\]')
+ buf += '"["%s"]"' % verb(desc)
if 'arg' in item:
buf += '":%s"' % verb(' '.join(item['arg']))
elif options[0] in suggesters: