From 8fee32e6c4e88a59c79199d7bff0383009012603 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 18 Feb 2014 10:41:00 +0100 Subject: [PATCH] Support multiple commands --- TODO | 1 - qutebrowser/commands/utils.py | 4 ++++ qutebrowser/qutebrowser.conf | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/TODO b/TODO index 8a46c419e..8c032699e 100644 --- a/TODO +++ b/TODO @@ -47,7 +47,6 @@ Hiding scrollbars :bind Ctrl+A/X to increase/decrease last number in URL position remembering -multiple commands with ; Other stuff =========== diff --git a/qutebrowser/commands/utils.py b/qutebrowser/commands/utils.py index 0aeb8a000..7de54da6a 100644 --- a/qutebrowser/commands/utils.py +++ b/qutebrowser/commands/utils.py @@ -155,6 +155,10 @@ class CommandParser(QObject): arguments. """ + if ';;' in text: + for sub in text.split(';;'): + self.run(sub, count, ignore_exc) + return try: self._parse(text) self._check() diff --git a/qutebrowser/qutebrowser.conf b/qutebrowser/qutebrowser.conf index 97b5d190c..0c3ec474e 100644 --- a/qutebrowser/qutebrowser.conf +++ b/qutebrowser/qutebrowser.conf @@ -75,6 +75,7 @@ wiki = ${wikipedia} # For simple keys (no @ signs), a capital letter means the key is pressed with # Shift. For modifier keys (with @ signs), you need to explicitely add "Shift-" # to match a key pressed with shift. +# You can bind multiple commands by separating them with ";;". o = open go = opencur O = tabopen