From 45e1feeb276b2d50a8fd3594da0c7831ba174c2b Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 2 May 2014 15:24:10 +0200 Subject: [PATCH] Handle arguments after aliases correctly when splitting. --- qutebrowser/commands/managers.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/qutebrowser/commands/managers.py b/qutebrowser/commands/managers.py index 59e5cd19f..948ab0fdf 100644 --- a/qutebrowser/commands/managers.py +++ b/qutebrowser/commands/managers.py @@ -165,7 +165,14 @@ class CommandManager: except (config.NoOptionError, config.NoSectionError): pass else: - return self.parse(alias, aliases=False) + try: + new_cmd = '{} {}'.format(alias, parts[1]) + except IndexError: + new_cmd = alias + if text.endswith(' '): + new_cmd += ' ' + logging.debug("Re-parsing with '{}'.".format(new_cmd)) + return self.parse(new_cmd, aliases=False) try: cmd = cmdutils.cmd_dict[cmdstr] except KeyError: