about summary refs log tree commit diff stats
path: root/doc/config.md
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-09-20 01:40:29 +0200
committerbptato <nincsnevem662@gmail.com>2023-09-20 01:40:29 +0200
commit24162bb4dc813f36f411cb262e51169d7d31bc43 (patch)
tree3e64f5125b62c4826e549ce320502ae4303d3a5f /doc/config.md
parent2539db24ab3481fd96129650eb2a206e01ab5bfc (diff)
downloadchawan-24162bb4dc813f36f411cb262e51169d7d31bc43.tar.gz
document pager.extern
it's better than nothing, maybe?
Diffstat (limited to 'doc/config.md')
-rw-r--r--doc/config.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/config.md b/doc/config.md
index 114a8152..029f9a8a 100644
--- a/doc/config.md
+++ b/doc/config.md
@@ -882,6 +882,19 @@ q = 'pager.ask("Do you want to exit Chawan?").then(x => x ? pager.quit() : void(
 </td>
 </tr>
 
+<tr>
+<td>`pager.extern(cmd, options = {setenv: true, 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>
+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
+will be fixed in the future.)</td>
+</tr>
+
 </table>