From 1655ddbfac868abc06aadf0ca12025385fcd14f7 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 2 May 2014 15:23:45 +0200 Subject: [PATCH] Restore original command when splitting aliases --- qutebrowser/commands/managers.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qutebrowser/commands/managers.py b/qutebrowser/commands/managers.py index e10a2b9cb..59e5cd19f 100644 --- a/qutebrowser/commands/managers.py +++ b/qutebrowser/commands/managers.py @@ -38,7 +38,9 @@ def split_cmdline(text): Return: A list of strings. """ + logging.debug("Splitting '{}'".format(text)) manager = CommandManager() + original_cmd = text.strip().split(maxsplit=1) try: parts = manager.parse(text) except NoSuchCommandError: @@ -46,6 +48,8 @@ def split_cmdline(text): if text.endswith(' '): parts.append('') logging.debug("Split parts: {}".format(parts)) + if len(parts) == 1 and parts[0]: + parts = original_cmd return parts