summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--poezio/decorators.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/poezio/decorators.py b/poezio/decorators.py
index 4891d5a5..87c9910e 100644
--- a/poezio/decorators.py
+++ b/poezio/decorators.py
@@ -118,7 +118,10 @@ class CommandArgParser(object):
def first(func):
def second(self, args, *a, **kw):
default_args = defaults
- args = common.shell_split(args)
+ if args and args.strip():
+ args = common.shell_split(args)
+ else:
+ args = []
if len(args) < mandatory:
return func(self, None, *a, **kw)
res, args = args[:mandatory], args[mandatory:]