summaryrefslogtreecommitdiff
path: root/doc/userscripts.asciidoc
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2020-12-19 21:00:57 +0100
committerFlorian Bruhin <me@the-compiler.org>2020-12-19 21:00:57 +0100
commitfbcb6ba842fc58a05305eb046fc9e73f15a88760 (patch)
treedfb594c0aece0d14bc28e24b2aca3eb941815c8e /doc/userscripts.asciidoc
parentf33d15242b0581387fa0035c84691206b47ebf37 (diff)
downloadqutebrowser-fbcb6ba842fc58a05305eb046fc9e73f15a88760.tar.gz
qutebrowser-fbcb6ba842fc58a05305eb046fc9e73f15a88760.zip
Clarify QUTE_COMMANDLINE_TEXT in userscript docs
Diffstat (limited to 'doc/userscripts.asciidoc')
-rw-r--r--doc/userscripts.asciidoc6
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/userscripts.asciidoc b/doc/userscripts.asciidoc
index 9bbc68ce0..e97a951c4 100644
--- a/doc/userscripts.asciidoc
+++ b/doc/userscripts.asciidoc
@@ -38,7 +38,11 @@ The following environment variables will be set when a userscript is launched:
- `QUTE_CONFIG_DIR`: Path of the directory containing qutebrowser's configuration.
- `QUTE_DATA_DIR`: Path of the directory containing qutebrowser's data.
- `QUTE_DOWNLOAD_DIR`: Path of the downloads directory.
-- `QUTE_COMMANDLINE_TEXT`: Text currently in qutebrowser's command line.
+- `QUTE_COMMANDLINE_TEXT`: Text currently in qutebrowser's command line. Note
+ this is only useful for userscripts spawned (e.g. via a keybinding) when
+ qutebrowser is still in command mode. If you want to receive arguments passed
+ to your userscript via `:spawn`, use the normal way of getting commandline
+ arguments (e.g. `$@` in bash or `sys.argv` / `argparse` / ... in Python).
In `command` mode: