about summary refs log tree commit diff stats
path: root/doc
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
parent2539db24ab3481fd96129650eb2a206e01ab5bfc (diff)
downloadchawan-24162bb4dc813f36f411cb262e51169d7d31bc43.tar.gz
document pager.extern
it's better than nothing, maybe?
Diffstat (limited to 'doc')
-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>
 
 
l?h=main&id=5059f32d0ddf36b9591ad0c14ee474ad5f2f8816'>^
25ad969f ^
fe8bf967 ^
25ad969f ^















































7a219c68 ^
fe8bf967 ^
25ad969f ^


7a219c68 ^

25ad969f ^




7a219c68 ^
25ad969f ^






7a219c68 ^
25ad969f ^



7a219c68 ^
25ad969f ^

7a219c68 ^

25ad969f ^


7a219c68 ^
25ad969f ^






15cd825d ^
25ad969f ^
15cd825d ^
7a219c68 ^
25ad969f ^













15cd825d ^


25ad969f ^

7a219c68 ^
25ad969f ^




7a219c68 ^
25ad969f ^




7a219c68 ^

25ad969f ^






7a219c68 ^







25ad969f ^







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177