summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--alot/commands/search.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/alot/commands/search.py b/alot/commands/search.py
index 2c53347e..f25fd519 100644
--- a/alot/commands/search.py
+++ b/alot/commands/search.py
@@ -114,7 +114,13 @@ class RetagPromptCommand(Command):
thread = ui.current_buffer.get_selected_thread()
if not thread:
return
- initial_tagstring = ','.join(thread.get_tags())
+ tags = []
+ for tag in thread.get_tags():
+ if ' ' in tag:
+ tags.append('"%s"' % tag)
+ else:
+ tags.append(tag)
+ initial_tagstring = ','.join(tags)
ui.commandprompt('retag ' + initial_tagstring)