aboutsummaryrefslogtreecommitdiffhomepage
path: root/README
diff options
context:
space:
mode:
authorGravatar Brendan Taylor <whateley@gmail.com>2010-11-29 20:10:29 -0700
committerGravatar Brendan Taylor <whateley@gmail.com>2010-11-29 20:10:29 -0700
commite293bf512759ac46b48707bac376d04400d5e27d (patch)
tree0d4d7386e96f54dac7cc42cd74702e851f1983a3 /README
parent0faed45023a73e446f606871b2480a317e4d8d2d (diff)
deprecate the positional arguments in the README
Diffstat (limited to 'README')
-rw-r--r--README38
1 files changed, 17 insertions, 21 deletions
diff --git a/README b/README
index 34556f2..22c1a99 100644
--- a/README
+++ b/README
@@ -480,23 +480,22 @@ You can use external scripts with Uzbl the following ways:
Have a look at the sample configs and scripts!
-Handler scripts that are called by `uzbl` are passed the following arguments:
+Scripts called by `uzbl` (with `spawn`, `sync_spawn`, `sh` or `sync_sh`) have
+access to the following environment variables:
-* `$1 config`: The configuration file loaded by this `uzbl` instance.
-* `$2 pid`: The process ID of this `uzbl` instance.
-* `$3 x_id`: The X Windows ID of the process.
-* `$4 fifo`: The filename of the FIFO being used, if any.
-* `$5 socket`: The filename of the Unix socket being used, if any.
-* `$6 uri`: The URI of the current page.
-* `$7 title`: The current page title.
-* `.. [ script specific ] (optional)`
+* `$UZBL_CONFIG`: The configuration file loaded by this `uzbl` instance.
+* `$UZBL_PID`: The process ID of this `uzbl` instance.
+* `$UZBL_XID`: The X Windows ID of the process.
+* `$UZBL_FIFO`: The filename of the FIFO being used, if any.
+* `$UZBL_SOCKET`: The filename of the Unix socket being used, if any.
+* `$UZBL_URI`: The URI of the current page.
+* `$UZBL_TITLE`: The current page title.
-The script specific arguments are:
+These variables are also available as positional arguments `$1` through `$7`,
+but this is deprecated and will be removed.
-* download
-
- - `$8 url`: The URL of the item to be downloaded.
- - `$9 proxy`: (optional) The URL of an HTTP proxy.
+Handler scripts (`cookie_handler`, `scheme_handler` and
+`authentication_handler`) are called with special arguments:
* cookie handler
@@ -514,13 +513,10 @@ The script specific arguments are:
* authentication handler:
- $8 authentication zone unique identifier
- $9 domain part of URL that requests authentication
- $10 authentication realm
- $11 FALSE if this is the first attempt to authenticate, TRUE otherwise
-
-Custom, userdefined scripts (`spawn foo bar`) get first the arguments as
-specified in the config and then the above 7 are added at the end.
+ - `$8`: authentication zone unique identifier
+ - `$9`: domain part of URL that requests authentication
+ - `$10`: authentication realm
+ - `$11`: FALSE if this is the first attempt to authenticate, TRUE otherwise
### Formfiller.sh