summaryrefslogtreecommitdiff
path: root/alot
diff options
context:
space:
mode:
authorpazz <patricktotzke@gmail.com>2011-08-06 16:16:59 +0100
committerpazz <patricktotzke@gmail.com>2011-08-06 16:16:59 +0100
commit58a77b5d9f6f08b4f93ca358c9927157ab5ae653 (patch)
tree56e32d86e6e1a0d187408388aff52a3f87e4c3d9 /alot
parentc747d0c845ca6cb2ec943249b8ce65012dae3705 (diff)
fix: parameter for compose should go to To
Diffstat (limited to 'alot')
-rw-r--r--alot/command.py5
-rw-r--r--alot/completion.py2
2 files changed, 5 insertions, 2 deletions
diff --git a/alot/command.py b/alot/command.py
index 7f7ade36..ac626345 100644
--- a/alot/command.py
+++ b/alot/command.py
@@ -919,7 +919,10 @@ def interpret_commandline(cmdline, mode):
if cmd == 'search':
return commandfactory(cmd, mode=mode, query=params)
elif cmd == 'compose':
- return commandfactory(cmd, mode=mode, headers={'To': params})
+ h ={}
+ if params:
+ h = {'To': params}
+ return commandfactory(cmd, mode=mode, headers=h)
elif cmd == 'prompt':
return commandfactory(cmd, mode=mode, startstring=params)
elif cmd == 'refine':
diff --git a/alot/completion.py b/alot/completion.py
index 74d20235..2b3709d1 100644
--- a/alot/completion.py
+++ b/alot/completion.py
@@ -134,7 +134,7 @@ class CommandLineCompleter(Completer):
return self._tagscompleter.complete(params)
if cmd == 'toggletag':
return self._tagscompleter.complete(params, last=True)
- if cmd == 'to':
+ if cmd in ['to', 'compose']:
return self._contactscompleter.complete(params)
if cmd == 'edit':
return self._pathcompleter.complete(params)