From 8940e05baf210bdeb9e24c7c0125d0e5b12a3e36 Mon Sep 17 00:00:00 2001 From: Marc Jauvin Date: Fri, 12 Jan 2018 17:27:44 -0500 Subject: [PATCH] bind without agruments shows current bindings --- qutebrowser/config/configcommands.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/qutebrowser/config/configcommands.py b/qutebrowser/config/configcommands.py index 7d9adb475..8b6c3ce3f 100644 --- a/qutebrowser/config/configcommands.py +++ b/qutebrowser/config/configcommands.py @@ -96,7 +96,8 @@ class ConfigCommands: @cmdutils.register(instance='config-commands', maxsplit=1, no_cmd_split=True, no_replace_variables=True) @cmdutils.argument('command', completion=configmodel.bind) - def bind(self, key, command=None, *, mode='normal', default=False): + @cmdutils.argument('win_id', win_id=True) + def bind(self, win_id, key=None, command=None, *, mode='normal', default=False): """Bind a key to a command. Args: @@ -108,6 +109,13 @@ class ConfigCommands: available modes. default: If given, restore a default binding. """ + + if key is None: + tabbed_browser = objreg.get('tabbed-browser', scope='window', + window=win_id) + tabbed_browser.openurl(QUrl('qute://bindings'), newtab=True) + return + if command is None: if default: # :bind --default: Restore default