aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-10-27 22:33:21 +0100
committerbptato <nincsnevem662@gmail.com>2024-10-27 22:33:21 +0100
commita42e660627fe5715f6f4d5a9215394baec775726 (patch)
tree285c6af21821a0417d83a378de9eb637b9c32aef /doc
parent00544b6053a1bd348148f74e60a5a22195859617 (diff)
downloadchawan-a42e660627fe5715f6f4d5a9215394baec775726.tar.gz
pager: misc extern fixes
* fix externFilterSource ignoring content types other than html * refactor runProcess to use a custom fork/exec instead of system(3)
Diffstat (limited to 'doc')
-rw-r--r--doc/api.md12
1 files changed, 7 insertions, 5 deletions
diff --git a/doc/api.md b/doc/api.md
index ec41f390..54bfb7d6 100644
--- a/doc/api.md
+++ b/doc/api.md
@@ -255,12 +255,14 @@ Like `pager.ask`, but the return value is a character.</td>
</tr>
<tr>
-<td>`extern(cmd, options = {setenv: true, suspend: true, wait: false})`
+<td>`extern(cmd, options = {env: { ... }, suspend: true, wait: false})`
</td>
-<td>Run an external command `cmd`. The `$CHA_URL` and `$CHA_CHARSET` variables
-are set when `options.setenv` is true. `options.suspend` suspends the pager
-while the command is being executed, and `options.wait` makes it so the user
-must press a key before the pager is resumed.<br>
+<td>Run an external command `cmd`.<br>
+By default, the `$CHA_URL` and `$CHA_CHARSET` variables are set; change
+this using the `env` option.<br>
+`options.suspend` suspends the pager while the command is being
+executed, and `options.wait` makes it so the user must press a key
+before the pager is resumed.<br>
Returns true if the command exit successfully, false otherwise.<br>
Warning: this has a bug where the output is written to stdout even if suspend
is true. Redirect to /dev/null in the command if this is not desired. (This