From 2d258ec53f8865c38efcc4815a0e06542e7037d3 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 6 Apr 2015 17:32:33 +0200 Subject: [PATCH] Add note about maxsplit/no_split_cmd args to docs. --- doc/help/commands.asciidoc | 40 ++++++++++++++++++++++++++++++++++++++ scripts/src2asciidoc.py | 11 +++++++++++ 2 files changed, 51 insertions(+) diff --git a/doc/help/commands.asciidoc b/doc/help/commands.asciidoc index 69d6f7d29..5a62f8508 100644 --- a/doc/help/commands.asciidoc +++ b/doc/help/commands.asciidoc @@ -93,6 +93,10 @@ Bind a key to a command. * +*-f*+, +*--force*+: Rebind the key if it is already bound. +==== note +* This command does not split arguments after the last argument and handles quotes literally. +* With this command, +;;+ is interpreted literally instead of splitting off a second command. + [[close]] === close Close the current window. @@ -245,6 +249,10 @@ Execute a command after some time. * +'ms'+: How many milliseconds to wait. * +'command'+: The command to run, with optional args. +==== note +* This command does not split arguments after the last argument and handles quotes literally. +* With this command, +;;+ is interpreted literally instead of splitting off a second command. + [[navigate]] === navigate Syntax: +:navigate [*--tab*] [*--bg*] [*--window*] 'where'+ @@ -287,6 +295,10 @@ Open a URL in the current/[count]th tab. ==== count The tab index to open the URL in. +==== note +* This command does not split arguments after the last argument and handles quotes literally. +* With this command, +;;+ is interpreted literally instead of splitting off a second command. + [[paste]] === paste Syntax: +:paste [*--sel*] [*--tab*] [*--bg*] [*--window*]+ @@ -330,6 +342,10 @@ Delete a quickmark. ==== positional arguments * +'name'+: The name of the quickmark to delete. +==== note +* This command does not split arguments after the last argument and handles quotes literally. +* With this command, +;;+ is interpreted literally instead of splitting off a second command. + [[quickmark-load]] === quickmark-load Syntax: +:quickmark-load [*--tab*] [*--bg*] [*--window*] 'name'+ @@ -344,6 +360,10 @@ Load a quickmark. * +*-b*+, +*--bg*+: Load the quickmark in a new background tab. * +*-w*+, +*--window*+: Load the quickmark in a new window. +==== note +* This command does not split arguments after the last argument and handles quotes literally. +* With this command, +;;+ is interpreted literally instead of splitting off a second command. + [[quickmark-save]] === quickmark-save Save the current page as a quickmark. @@ -374,6 +394,10 @@ Repeat a given command. * +'times'+: How many times to repeat. * +'command'+: The command to run, with optional args. +==== note +* This command does not split arguments after the last argument and handles quotes literally. +* With this command, +;;+ is interpreted literally instead of splitting off a second command. + [[report]] === report Report a bug in qutebrowser. @@ -404,6 +428,10 @@ Search for a text on the current page. With no text, clear results. ==== optional arguments * +*-r*+, +*--reverse*+: Reverse search direction. +==== note +* This command does not split arguments after the last argument and handles quotes literally. +* With this command, +;;+ is interpreted literally instead of splitting off a second command. + [[session-delete]] === session-delete Syntax: +:session-delete [*--force*] 'name'+ @@ -476,6 +504,10 @@ Preset the statusbar to some text. ==== optional arguments * +*-s*+, +*--space*+: If given, a space is added to the end. +==== note +* This command does not split arguments after the last argument and handles quotes literally. +* With this command, +;;+ is interpreted literally instead of splitting off a second command. + [[spawn]] === spawn Syntax: +:spawn [*--userscript*] 'args' ['args' ...]+ @@ -915,6 +947,10 @@ Evaluate a python string and display the results as a web page. ==== positional arguments * +'s'+: The string to evaluate. +==== note +* This command does not split arguments after the last argument and handles quotes literally. +* With this command, +;;+ is interpreted literally instead of splitting off a second command. + [[debug-trace]] === debug-trace Syntax: +:debug-trace ['expr']+ @@ -924,3 +960,7 @@ Trace executed code via hunter. ==== positional arguments * +'expr'+: What to trace, passed to hunter. +==== note +* This command does not split arguments after the last argument and handles quotes literally. +* With this command, +;;+ is interpreted literally instead of splitting off a second command. + diff --git a/scripts/src2asciidoc.py b/scripts/src2asciidoc.py index 80921fb4c..10f60ddc0 100755 --- a/scripts/src2asciidoc.py +++ b/scripts/src2asciidoc.py @@ -184,6 +184,17 @@ def _get_command_doc(name, cmd): output.append("==== count") output.append(parser.arg_descs[cmd.special_params['count']]) + if cmd.maxsplit is not None or cmd.no_cmd_split: + output.append("") + output.append("==== note") + if cmd.maxsplit is not None: + output.append("* This command does not split arguments after the " + "last argument and handles quotes literally.") + if cmd.no_cmd_split is not None: + output.append("* With this command, +;;+ is interpreted " + "literally instead of splitting off a second " + "command.") + output.append("") output.append("") return '\n'.join(output)