From 9669aca7d99dc46144c775efdea9453a24d39d9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= Date: Tue, 23 Aug 2016 21:05:15 +0200 Subject: [PATCH 1/5] remove random description of variables in commands' docstrings Full description is given at the top of qute://help/commands.html, duplicating this for some commands where it might be useful is unmaintainable. --- qutebrowser/browser/commands.py | 5 ----- qutebrowser/mainwindow/statusbar/command.py | 3 --- 2 files changed, 8 deletions(-) diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index 6ced51110..e6b098eb4 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -1026,11 +1026,6 @@ class CommandDispatcher: def spawn(self, cmdline, userscript=False, verbose=False, detach=False): """Spawn a command in a shell. - Note the `{url}` and `{url:pretty}` variables might be useful here. - `{url}` gets replaced by the URL in fully encoded format and - `{url:pretty}` uses a "pretty form" with most percent-encoded - characters decoded. - Args: userscript: Run the command as a userscript. You can use an absolute path, or store the userscript in one of those diff --git a/qutebrowser/mainwindow/statusbar/command.py b/qutebrowser/mainwindow/statusbar/command.py index df419c0dd..79a5f0305 100644 --- a/qutebrowser/mainwindow/statusbar/command.py +++ b/qutebrowser/mainwindow/statusbar/command.py @@ -95,9 +95,6 @@ class Command(misc.MinimalLineEditMixin, misc.CommandLineEdit): def set_cmd_text_command(self, text, space=False, append=False): """Preset the statusbar to some text. - You can use the `{url}` and `{url:pretty}` variables here which will - get replaced by the encoded/decoded URL. - // Wrapper for set_cmd_text to check the arguments and allow multiple From f36b8acec1fc51588793c83be3f66d3121e4d378 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= Date: Tue, 23 Aug 2016 21:08:12 +0200 Subject: [PATCH 2/5] adjust wording in commands top-level documentation There is no "commandline" for bindings in keys.conf, so describing it as for "command arguments" should be more accurate. --- qutebrowser/commands/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qutebrowser/commands/__init__.py b/qutebrowser/commands/__init__.py index bf44e449a..0a71d7bc4 100644 --- a/qutebrowser/commands/__init__.py +++ b/qutebrowser/commands/__init__.py @@ -22,7 +22,7 @@ Some commands are hidden, which means they don't show up in the command completion when pressing `:`, as they're typically not useful to run by hand. -In the commandline, there are also some variables you can use: +For command arguments, there are also some variables you can use: - `{url}` expands to the URL of the current page - `{url:pretty}` expands to the URL in decoded format From 3518fe19e8fef58a0af43a954bee9586730f3959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= Date: Tue, 23 Aug 2016 21:17:41 +0200 Subject: [PATCH 3/5] move explanation of ;; to commands documentation The note was out of place in keys.conf as it's not about keyinput. Since we have a top-level documentation for commands now, let's keep the info in once place. People will look there anyway for the documentation of commands they want to bind. --- qutebrowser/commands/__init__.py | 2 ++ qutebrowser/config/configdata.py | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/qutebrowser/commands/__init__.py b/qutebrowser/commands/__init__.py index 0a71d7bc4..70f058d82 100644 --- a/qutebrowser/commands/__init__.py +++ b/qutebrowser/commands/__init__.py @@ -28,4 +28,6 @@ For command arguments, there are also some variables you can use: - `{url:pretty}` expands to the URL in decoded format - `{clipboard}` expands to the clipboard contents - `{primary}` expands to the primary selection contents + +It is possible to run or bind multiple commands by separating them with `;;`. """ diff --git a/qutebrowser/config/configdata.py b/qutebrowser/config/configdata.py index 1c01c8470..89aee870f 100644 --- a/qutebrowser/config/configdata.py +++ b/qutebrowser/config/configdata.py @@ -1401,8 +1401,7 @@ KEY_FIRST_COMMENT = """ # # For simple keys (no `<>`-signs), a capital letter means the key is pressed # with Shift. For special keys (with `<>`-signs), you need to explicitly add -# `Shift-` to match a key pressed with shift. You can bind multiple commands -# by separating them with `;;`. +# `Shift-` to match a key pressed with shift. # # Note that default keybindings are always bound, and need to be explicitly # unbound if you wish to remove them: From cbe74f69916e89ae0143425a54a9faab98f5efd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= Date: Thu, 1 Sep 2016 09:58:05 +0200 Subject: [PATCH 4/5] fix adblock-update documentation The tilde has to be escaped, otherwise the HTML is broken. --- qutebrowser/browser/adblock.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qutebrowser/browser/adblock.py b/qutebrowser/browser/adblock.py index afdc9922e..81fc2f7e1 100644 --- a/qutebrowser/browser/adblock.py +++ b/qutebrowser/browser/adblock.py @@ -182,8 +182,8 @@ class HostBlocker: def adblock_update(self, win_id): """Update the adblock block lists. - This updates ~/.local/share/qutebrowser/blocked-hosts with downloaded - host lists and re-reads ~/.config/qutebrowser/blocked-hosts. + This updates `~/.local/share/qutebrowser/blocked-hosts` with downloaded + host lists and re-reads `~/.config/qutebrowser/blocked-hosts`. """ self._read_hosts_file(self._config_hosts_file, self._config_blocked_hosts) From 0764bdd50bfb9ac3c6235eb8f27828400192f5cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= Date: Fri, 2 Sep 2016 19:52:25 +0200 Subject: [PATCH 5/5] regenerate commands.asciidoc --- doc/help/commands.asciidoc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/doc/help/commands.asciidoc b/doc/help/commands.asciidoc index eb76fa84f..d13f20ead 100644 --- a/doc/help/commands.asciidoc +++ b/doc/help/commands.asciidoc @@ -9,13 +9,15 @@ In qutebrowser, all keybindings are mapped to commands. Some commands are hidden, which means they don't show up in the command completion when pressing `:`, as they're typically not useful to run by hand. -In the commandline, there are also some variables you can use: +For command arguments, there are also some variables you can use: - `{url}` expands to the URL of the current page - `{url:pretty}` expands to the URL in decoded format - `{clipboard}` expands to the clipboard contents - `{primary}` expands to the primary selection contents +It is possible to run or bind multiple commands by separating them with `;;`. + == Normal commands .Quick reference [options="header",width="75%",cols="25%,75%"] @@ -92,7 +94,7 @@ In the commandline, there are also some variables you can use: === adblock-update Update the adblock block lists. -This updates ~/.local/share/qutebrowser/blocked-hosts with downloaded host lists and re-reads ~/.config/qutebrowser/blocked-hosts. +This updates `~/.local/share/qutebrowser/blocked-hosts` with downloaded host lists and re-reads `~/.config/qutebrowser/blocked-hosts`. [[back]] === back @@ -724,8 +726,6 @@ Syntax: +:set-cmd-text [*--space*] [*--append*] 'text'+ Preset the statusbar to some text. -You can use the `{url}` and `{url:pretty}` variables here which will get replaced by the encoded/decoded URL. - ==== positional arguments * +'text'+: The commandline to set. @@ -742,8 +742,6 @@ Syntax: +:spawn [*--userscript*] [*--verbose*] [*--detach*] 'cmdline'+ Spawn a command in a shell. -Note the `{url}` and `{url:pretty}` variables might be useful here. `{url}` gets replaced by the URL in fully encoded format and `{url:pretty}` uses a "pretty form" with most percent-encoded characters decoded. - ==== positional arguments * +'cmdline'+: The commandline to execute.