diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2011-10-08 23:19:30 +0100 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2011-10-08 23:20:10 +0100 |
commit | 4af410805ae479aee3e8f2310a58bcc2269bb7f0 (patch) | |
tree | 16951bbf1490e1fe3e0c2a5aa23150f06be72948 /alot/completion.py | |
parent | 1e137dca3afc30cdeff7c532fb5282e2e286e75d (diff) |
fix completion for refine command
Diffstat (limited to 'alot/completion.py')
-rw-r--r-- | alot/completion.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/alot/completion.py b/alot/completion.py index b5d75119..b760069a 100644 --- a/alot/completion.py +++ b/alot/completion.py @@ -189,18 +189,21 @@ class CommandLineCompleter(Completer): else: cmd, params = words localpos = pos - (len(cmd) + 1) - if cmd in ['search', 'refine']: + if cmd == 'search': res = self._querycompleter.complete(params, localpos) - if cmd == 'retag': + elif cmd == 'refine': + if self.mode == 'search': + res = self._querycompleter.complete(params, localpos) + elif cmd == 'retag': res = self._tagscompleter.complete(params, localpos, single_tag=False) - if cmd == 'toggletag': + elif cmd == 'toggletag': res = self._tagscompleter.complete(params, localpos) - if cmd == 'help': + elif cmd == 'help': res = self._commandcompleter.complete(params, localpos) - if cmd in ['to', 'compose']: + elif cmd in ['to', 'compose']: res = self._contactscompleter.complete(params, localpos) - if cmd in ['attach', 'edit', 'save']: + elif cmd in ['attach', 'edit', 'save']: res = self._pathcompleter.complete(params, localpos) res = [('%s %s' % (cmd, t), p + len(cmd) + 1) for (t, p) in res] return res |