summaryrefslogtreecommitdiff
path: root/alot/commands/globals.py
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2011-10-16 15:19:56 +0100
committerPatrick Totzke <patricktotzke@gmail.com>2011-10-16 15:19:56 +0100
commitab194e7c0a763a71bba442a8871048bbf48cc185 (patch)
tree06a4cbb7a8f5e3993374521fcb6059c499fb9c60 /alot/commands/globals.py
parent1093f98e780ae9d09f3a28647fa15622422f1b55 (diff)
colect args in globals refine/search
Diffstat (limited to 'alot/commands/globals.py')
-rw-r--r--alot/commands/globals.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/alot/commands/globals.py b/alot/commands/globals.py
index 34236d64..fba07d93 100644
--- a/alot/commands/globals.py
+++ b/alot/commands/globals.py
@@ -19,6 +19,7 @@ from alot.completion import ContactsCompleter
from alot.completion import AccountCompleter
from alot.message import encode_header
from alot import commands
+import argparse
MODE = 'global'
@@ -34,8 +35,9 @@ class ExitCommand(Command):
ui.exit()
-@registerCommand(MODE, 'search', help='open a new search buffer', arguments=[
- (['query'], {'nargs':'*', 'default':'', 'help':'search string'})])
+@registerCommand(MODE, 'search', usage='search query', arguments=[
+ (['query'], {'nargs':argparse.REMAINDER, 'help':'search string'})],
+ help='open a new search buffer')
class SearchCommand(Command):
def __init__(self, query, **kwargs):
self.query = ' '.join(query)