summaryrefslogtreecommitdiff
path: root/alot/commands/search.py
diff options
context:
space:
mode:
Diffstat (limited to 'alot/commands/search.py')
-rw-r--r--alot/commands/search.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/alot/commands/search.py b/alot/commands/search.py
index 14f267cd..82a3cf39 100644
--- a/alot/commands/search.py
+++ b/alot/commands/search.py
@@ -13,6 +13,7 @@ from .. import commands
from .. import buffers
from ..db.errors import DatabaseROError
+from ..db.sort import NAME as SORT_NAME
MODE = 'search'
@@ -35,8 +36,8 @@ class OpenThreadCommand(Command):
@registerCommand(MODE, 'refine', help='refine query', arguments=[
- (['--sort'], {'help': 'sort order', 'choices': [
- 'oldest_first', 'newest_first', 'message_id', 'unsorted']}),
+ (['--sort'], {'help': 'sort order',
+ 'choices': list(SORT_NAME.keys())}),
(['query'], {'nargs': argparse.REMAINDER, 'help': 'search string'})])
@registerCommand(MODE, 'sort', help='set sort order', arguments=[
(['sort'], {'help': 'sort order', 'choices': [
@@ -55,7 +56,7 @@ class RefineCommand(Command):
self.querystring = None
else:
self.querystring = ' '.join(query)
- self.sort_order = sort
+ self.sort_order = SORT_NAME[sort]
super().__init__(**kwargs)
def apply(self, ui):