diff --git a/doc/help/commands.asciidoc b/doc/help/commands.asciidoc index 45f2fc1ef..082997884 100644 --- a/doc/help/commands.asciidoc +++ b/doc/help/commands.asciidoc @@ -4,6 +4,18 @@ = Commands +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: + +- `{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 + == Normal commands .Quick reference [options="header",width="75%",cols="25%,75%"] diff --git a/qutebrowser/commands/__init__.py b/qutebrowser/commands/__init__.py index 07a5cba0a..bf44e449a 100644 --- a/qutebrowser/commands/__init__.py +++ b/qutebrowser/commands/__init__.py @@ -17,4 +17,15 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see . -"""Utilities and classes regarding to commands.""" +"""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: + +- `{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 +""" diff --git a/scripts/dev/src2asciidoc.py b/scripts/dev/src2asciidoc.py index 0ca72d860..6a29c3410 100755 --- a/scripts/dev/src2asciidoc.py +++ b/scripts/dev/src2asciidoc.py @@ -37,7 +37,7 @@ sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir, # We import qutebrowser.app so all @cmdutils-register decorators are run. import qutebrowser.app from scripts import asciidoc2html, utils -from qutebrowser import qutebrowser +from qutebrowser import qutebrowser, commands from qutebrowser.commands import cmdutils, argparser from qutebrowser.config import configdata from qutebrowser.utils import docutils, usertypes @@ -320,7 +320,8 @@ def generate_commands(filename): """Generate the complete commands section.""" with _open_file(filename) as f: f.write(FILE_HEADER) - f.write("= Commands\n") + f.write("= Commands\n\n") + f.write(commands.__doc__) normal_cmds = [] hidden_cmds = [] debug_cmds = []