diff options
-rw-r--r-- | doc/config.md | 13 | ||||
-rw-r--r-- | todo | 1 |
2 files changed, 13 insertions, 1 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> diff --git a/todo b/todo index 37347e1d..4c0098f8 100644 --- a/todo +++ b/todo @@ -56,7 +56,6 @@ network: - websockets (curl supports ws) - integrate curl-impersonate (LD_PRELOAD works, but still...) external: -- something like EXTERN - local cgi - history, bookmarks (w3m format) - save buffer (source, output) |