From bb3383dc0be464349d6c09bc7bbcff6957ea1a9d Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 19 Mar 2020 10:14:57 +0100 Subject: Fix :spawn documentation (cherry picked from commit 831d696de2a7a3c259d2025178b5372b2c9e9c61) --- doc/help/commands.asciidoc | 6 ++++-- qutebrowser/browser/commands.py | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/doc/help/commands.asciidoc b/doc/help/commands.asciidoc index bbe5a6f3d..80d2ca848 100644 --- a/doc/help/commands.asciidoc +++ b/doc/help/commands.asciidoc @@ -112,7 +112,7 @@ possible to run or bind multiple commands by separating them with `;;`. |<>|Set an option. |<>|Preset the statusbar to some text. |<>|Set a mark at the current scroll position in the current tab. -|<>|Spawn a command in a shell. +|<>|Spawn an external command. |<>|Stop loading in the current/[count]th tab. |<>|Duplicate the current tab. |<>|Close the current/[count]th tab. @@ -1256,7 +1256,9 @@ Syntax: +:spawn [*--userscript*] [*--verbose*] [*--output*] [*--output-messages* [*--detach*] 'cmdline'+ -Spawn a command in a shell. +Spawn an external command. + +Note that the command is *not* run in a shell, so things like `$VAR` or `> output` won't have the desired effect. ==== positional arguments * +'cmdline'+: The commandline to execute. diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index afa78df01..cf79672ca 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -1005,7 +1005,10 @@ class CommandDispatcher: @cmdutils.argument('output_messages', flag='m') def spawn(self, cmdline, userscript=False, verbose=False, output=False, output_messages=False, detach=False, count=None): - """Spawn a command in a shell. + """Spawn an external command. + + Note that the command is *not* run in a shell, so things like `$VAR` or + `> output` won't have the desired effect. Args: userscript: Run the command as a userscript. You can use an -- cgit v1.2.3-54-g00ecf