| | | |
Offset 1, 142 lines modified | Offset 1, 326 lines modified |
1 | .TH·EDITRC·5·"May·22,·2016"·"" | 1 | .\"» $NetBSD:·editrc.5,v·1.34·2022/12/06·00:59:20·uwe·Exp·$ |
| 2 | .\" |
| 3 | .\"·Copyright·(c)·1997-2000·The·NetBSD·Foundation,·Inc. |
| 4 | .\"·All·rights·reserved. |
| 5 | .\" |
| 6 | .\"·This·file·was·contributed·to·The·NetBSD·Foundation·by·Luke·Mewburn. |
| 7 | .\" |
| 8 | .\"·Redistribution·and·use·in·source·and·binary·forms,·with·or·without |
| 9 | .\"·modification,·are·permitted·provided·that·the·following·conditions |
| 10 | .\"·are·met: |
| 11 | .\"·1.·Redistributions·of·source·code·must·retain·the·above·copyright |
| 12 | .\"····notice,·this·list·of·conditions·and·the·following·disclaimer. |
| 13 | .\"·2.·Redistributions·in·binary·form·must·reproduce·the·above·copyright |
| 14 | .\"····notice,·this·list·of·conditions·and·the·following·disclaimer·in·the |
| 15 | .\"····documentation·and/or·other·materials·provided·with·the·distribution. |
| 16 | .\" |
| 17 | .\"·THIS·SOFTWARE·IS·PROVIDED·BY·THE·NETBSD·FOUNDATION,·INC.·AND·CONTRIBUTORS |
| 18 | .\"·``AS·IS''·AND·ANY·EXPRESS·OR·IMPLIED·WARRANTIES,·INCLUDING,·BUT·NOT·LIMITED |
| 19 | .\"·TO,·THE·IMPLIED·WARRANTIES·OF·MERCHANTABILITY·AND·FITNESS·FOR·A·PARTICULAR |
| 20 | .\"·PURPOSE·ARE·DISCLAIMED.··IN·NO·EVENT·SHALL·THE·FOUNDATION·OR·CONTRIBUTORS |
| 21 | .\"·BE·LIABLE·FOR·ANY·DIRECT,·INDIRECT,·INCIDENTAL,·SPECIAL,·EXEMPLARY,·OR |
| 22 | .\"·CONSEQUENTIAL·DAMAGES·(INCLUDING,·BUT·NOT·LIMITED·TO,·PROCUREMENT·OF |
| 23 | .\"·SUBSTITUTE·GOODS·OR·SERVICES;·LOSS·OF·USE,·DATA,·OR·PROFITS;·OR·BUSINESS |
| 24 | .\"·INTERRUPTION)·HOWEVER·CAUSED·AND·ON·ANY·THEORY·OF·LIABILITY,·WHETHER·IN |
| 25 | .\"·CONTRACT,·STRICT·LIABILITY,·OR·TORT·(INCLUDING·NEGLIGENCE·OR·OTHERWISE) |
| 26 | .\"·ARISING·IN·ANY·WAY·OUT·OF·THE·USE·OF·THIS·SOFTWARE,·EVEN·IF·ADVISED·OF·THE |
| 27 | .\"·POSSIBILITY·OF·SUCH·DAMAGE. |
| 28 | .\" |
| 29 | .Dd·May·22,·2016 |
| 30 | .Dt·EDITRC·5 |
| 31 | .Os |
2 | .SH·NAME | 32 | .Sh·NAME |
3 | \fBeditrc\fP | 33 | .Nm·editrc |
4 | \-·configuration·file·for·editline·library | 34 | .Nd·configuration·file·for·editline·library |
5 | .SH·SYNOPSIS | 35 | .Sh·SYNOPSIS |
| 36 | .Nm |
6 | .br | |
7 | \fBeditrc\fP | |
8 | .SH·DESCRIPTION | 37 | .Sh·DESCRIPTION |
9 | The | 38 | The |
10 | \fBeditrc\fP | 39 | .Nm |
11 | file·defines·various·settings·to·be·used·by·the | 40 | file·defines·various·settings·to·be·used·by·the |
12 | \fBeditline\fP(3) | 41 | .Xr·editline·3 |
13 | library. | 42 | library. |
| 43 | .Pp |
14 | The·format·of·each·line·is: | 44 | The·format·of·each·line·is: |
| 45 | .Pp |
| 46 | .D1·Oo·Ar·prog·Ns·Ic·\&:·Oc·Ns·Ar·command·Oo·Ar·arg·...·Oc |
| 47 | .Pp |
| 48 | .Ar·command |
15 | is·one·of·the | 49 | is·one·of·the |
| 50 | .Xr·editline·3 |
16 | builtin·commands. | 51 | builtin·commands. |
17 | Refer·to | 52 | Refer·to |
| 53 | .Sx·BUILTIN·COMMANDS |
18 | for·more·information. | 54 | for·more·information. |
| 55 | .Pp |
| 56 | .Ar·prog |
19 | is·the·program·name·string·that·a·program·defines·when·it·calls | 57 | is·the·program·name·string·that·a·program·defines·when·it·calls |
| 58 | .Xr·el_init·3 |
20 | to·set·up | 59 | to·set·up |
| 60 | .Xr·editline·3·, |
21 | which·is·usually | 61 | which·is·usually |
| 62 | .Va·argv·Ns·Li·[0]·. |
| 63 | .Ar·command |
22 | will·be·executed·for·any·program·which·matches | 64 | will·be·executed·for·any·program·which·matches |
| 65 | .Ar·prog·. |
| 66 | .Pp |
| 67 | .Ar·prog |
23 | may·also·be·a | 68 | may·also·be·a |
| 69 | .Xr·regex·3 |
24 | style | 70 | style |
25 | regular·expression,·in·which·case | 71 | regular·expression,·in·which·case |
| 72 | .Ar·command |
26 | will·be·executed·for·any·program·that·matches·the·regular·expression. | 73 | will·be·executed·for·any·program·that·matches·the·regular·expression. |
| 74 | .Pp |
27 | If | 75 | If |
| 76 | .Ar·prog |
28 | is·absent, | 77 | is·absent, |
| 78 | .Ar·command |
29 | is·executed·for·all·programs. | 79 | is·executed·for·all·programs. |
| 80 | .Sh·BUILTIN·COMMANDS |
30 | The | 81 | The |
| 82 | .Nm·editline |
31 | library·has·some·builtin·commands,·which·affect·the·way | 83 | library·has·some·builtin·commands,·which·affect·the·way |
32 | that·the·line·editing·and·history·functions·operate. | 84 | that·the·line·editing·and·history·functions·operate. |
33 | These·are·based·on·similar·named·builtins·present·in·the | 85 | These·are·based·on·similar·named·builtins·present·in·the |
| 86 | .Xr·tcsh·1 |
34 | shell. | 87 | shell. |
| 88 | .Pp |
35 | The·following·builtin·commands·are·available: | 89 | The·following·builtin·commands·are·available: |
| 90 | .Bl·-tag·-width·4n |
| 91 | .It·Ic·bind·Oo·Fl·aeklrsv·Oc·Op·Ar·key·Op·Ar·command |
36 | Without·options·and·arguments,·list·all·bound·keys·and·macros,·and | 92 | Without·options·and·arguments,·list·all·bound·keys·and·macros,·and |
37 | the·editor·command·or·input·string·to·which·each·one·is·bound. | 93 | the·editor·command·or·input·string·to·which·each·one·is·bound. |
38 | If·only | 94 | If·only |
| 95 | .Ar·key |
39 | is·supplied,·show·the·binding·for·that·key·or·macro. | 96 | is·supplied,·show·the·binding·for·that·key·or·macro. |
40 | If | 97 | If |
| 98 | .Ar·key·command |
41 | is·supplied,·bind·the·editor | 99 | is·supplied,·bind·the·editor |
| 100 | .Ar·command |
42 | to·that·key·or·macro. | 101 | to·that·key·or·macro. |
| 102 | .Pp |
43 | The·options·are·as·follows: | 103 | The·options·are·as·follows: |
| 104 | .Bl·-tag·-width·4n |
| 105 | .It·Fl·a |
44 | List·or·change·key·bindings·in·the | 106 | List·or·change·key·bindings·in·the |
| 107 | .Xr·vi·1 |
45 | mode·alternate·(command·mode)·key·map. | 108 | mode·alternate·(command·mode)·key·map. |
| 109 | .It·Fl·e |
46 | Bind·all·keys·to·the·standard | 110 | Bind·all·keys·to·the·standard |
| 111 | .Tn·GNU |
47 | Emacs-like·bindings. | 112 | Emacs-like·bindings. |
| 113 | .It·Fl·k |
| 114 | .Ar·key |
48 | is·interpreted·as·a·symbolic·arrow·key·name,·which·may·be·one·of | 115 | is·interpreted·as·a·symbolic·arrow·key·name,·which·may·be·one·of |
| 116 | .Ic·up·, |
| 117 | .Ic·down·, |
| 118 | .Ic·left |
49 | or | 119 | or |
| 120 | .Ic·right·. |
| 121 | .It·Fl·l |
50 | List·all·editor·commands·and·a·short·description·of·each. | 122 | List·all·editor·commands·and·a·short·description·of·each. |
| 123 | .It·Fl·r |
51 | Remove·the·binding·of·the·key·or·macro | 124 | Remove·the·binding·of·the·key·or·macro |
| 125 | .Ar·key·. |
| 126 | .It·Fl·s |
52 | Define·a·keyboard·macro·rather·than·a·key·binding·or·command·macro: | 127 | Define·a·keyboard·macro·rather·than·a·key·binding·or·command·macro: |
| 128 | .Ar·command |
53 | is·taken·as·a·literal·string·and·appended·to·the·input·queue·whenever | 129 | is·taken·as·a·literal·string·and·appended·to·the·input·queue·whenever |
| 130 | .Ar·key |
54 | is·typed. | 131 | is·typed. |
55 | Bound·keys·and·macros·in | 132 | Bound·keys·and·macros·in |
| 133 | .Ar·command |
56 | are·themselves·reinterpreted,·and·this·continues·for·ten·levels·of | 134 | are·themselves·reinterpreted,·and·this·continues·for·ten·levels·of |
57 | interpretation. | 135 | interpretation. |
| 136 | .It·Fl·v |
58 | Bind·all·keys·to·the·standard | 137 | Bind·all·keys·to·the·standard |
| 138 | .Xr·vi·1·Ns·-like |
59 | bindings. | 139 | bindings. |
| 140 | .El |
| 141 | .Pp |
60 | The | 142 | The |
| 143 | .Xr·editline·7 |
61 | manual·documents·all·editor·commands·and·contains·more·information | 144 | manual·documents·all·editor·commands·and·contains·more·information |
62 | about·macros·and·the·input·queue. | 145 | about·macros·and·the·input·queue. |
| 146 | .Pp |
| 147 | .Ar·key |
63 | and | 148 | and |
| 149 | .Ar·command |
64 | can·contain·control·characters·of·the·form | 150 | can·contain·control·characters·of·the·form |
| 151 | .Sq·Ic·^·Ns·Ar·character |
| 152 | .Po |
65 | e.g.\& | 153 | e.g.\& |
| 154 | .Ql·^A |
| 155 | .Pc·, |
66 | and·the·following·backslashed·escape·sequences: | 156 | and·the·following·backslashed·escape·sequences: |
| 157 | .Pp |
| 158 | .Bl·-tag·-compact·-offset·indent·-width·Ic |
| 159 | .It·Ic·\ea |
67 | Bell | 160 | Bell |
| 161 | .It·Ic·\eb |
68 | Backspace | 162 | Backspace |
| 163 | .It·Ic·\ee |
69 | Escape | 164 | Escape |
| 165 | .It·Ic·\ef |
70 | Formfeed | 166 | Formfeed |
| 167 | .It·Ic·\en |
71 | Newline | 168 | Newline |
| 169 | .It·Ic·\er |
72 | Carriage·return | 170 | Carriage·return |
| 171 | .It·Ic·\et |
73 | Horizontal·tab | 172 | Horizontal·tab |
| 173 | .It·Ic·\ev |
74 | Vertical·tab | 174 | Vertical·tab |
| 175 | .Sm·off |
| 176 | .It·Ic·\e·Ar·nnn |
| 177 | .Sm·on |
75 | The | 178 | The |
| 179 | .Tn·ASCII |
76 | character·corresponding·to·the·octal·number | 180 | character·corresponding·to·the·octal·number |
| 181 | .Ar·nnn·. |
| 182 | .El |
| 183 | .Pp |
| 184 | .Ql·\e |
77 | nullifies·the·special·meaning·of·the·following·character, | 185 | nullifies·the·special·meaning·of·the·following·character, |
78 | if·it·has·any,·notably | 186 | if·it·has·any,·notably |
| 187 | .Ql·\e |
79 | and | 188 | and |
| 189 | .Ql·^·. |
| 190 | .It·Ic·echotc·Oo·Fl·sv·Oc·Ar·arg·Ar·... |
80 | Exercise·terminal·capabilities·given·in | 191 | Exercise·terminal·capabilities·given·in |
| 192 | .Ar·arg·. |
81 | If | 193 | If |
| 194 | .Ar·arg |
82 | is | 195 | is |
| 196 | .Ql·baud·, |
| 197 | .Ql·cols·, |
| 198 | .Ql·lines·, |
| 199 | .Ql·rows·, |
| 200 | .Ql·meta·, |
83 | or | 201 | or |
| 202 | .Ql·tabs·, |
84 | the·value·of·that·capability·is·printed,·with | 203 | the·value·of·that·capability·is·printed,·with |
| 204 | .Dq·yes |
85 | or | 205 | or |
| 206 | .Dq·no |
86 | indicating·that·the·terminal·does·or·does·not·have·that·capability. | 207 | indicating·that·the·terminal·does·or·does·not·have·that·capability. |
| 208 | .Pp |
| 209 | .Fl·s |
87 | returns·an·empty·string·for·non-existent·capabilities,·rather·than | 210 | returns·an·empty·string·for·non-existent·capabilities,·rather·than |
88 | causing·an·error. | 211 | causing·an·error. |
| 212 | .Fl·v |
89 | causes·messages·to·be·verbose. | 213 | causes·messages·to·be·verbose. |
| 214 | .It·Ic·edit·Op·Li·on·No·|·Li·off |
90 | Enable·or·disable·the | 215 | Enable·or·disable·the |
| 216 | .Nm·editline |
91 | functionality·in·a·program. | 217 | functionality·in·a·program. |
| 218 | .It·Ic·history·Li·list·No·|·Li·size·Ar·n·No·|·Li·unique·Ar·n |
92 | The | 219 | The |
| 220 | .Ql·list |
93 | command·lists·all·entries·in·the·history. | 221 | command·lists·all·entries·in·the·history. |
94 | The | 222 | The |
| 223 | .Ql·size |
95 | command·sets·the·history·size·to | 224 | command·sets·the·history·size·to |
| 225 | .Ar·n |
96 | entries. | 226 | entries. |
97 | The | 227 | The |
| 228 | .Ql·unique |
98 | command·controls·if·history·should·keep·duplicate·entries. | 229 | command·controls·if·history·should·keep·duplicate·entries. |
99 | If | 230 | If |
| 231 | .Ar·n |
100 | is·non·zero,·only·keep·unique·history·entries. | 232 | is·non·zero,·only·keep·unique·history·entries. |
101 | If | 233 | If |
| 234 | .Ar·n |
102 | is·zero,·then·keep·all·entries·(the·default). | 235 | is·zero,·then·keep·all·entries·(the·default). |
| 236 | .It·Ic·settc·Ar·cap·Ar·val |
103 | Set·the·terminal·capability | 237 | Set·the·terminal·capability |
| 238 | .Ar·cap |
104 | to | 239 | to |
| 240 | .Ar·val·, |
105 | as·defined·in | 241 | as·defined·in |
| 242 | .Xr·termcap·5·. |
106 | No·sanity·checking·is·done. | 243 | No·sanity·checking·is·done. |
| 244 | .It·Ic·setty·Oo·Fl·a·Oc·Oo·Fl·d·Oc·Oo·Fl·q·Oc·Oo·Fl·x·Oc·Oo·Ic·\&+·Ns·Ar·mode·Oc·\ |
107 | Oo·Fl·Ar·mode·Oc·Oo·Ar·mode·Oc·Oo·Ar·char\|·Ns·Ic·=·Ns·Ar·c·Oc | 245 | Oo·Fl·Ar·mode·Oc·Oo·Ar·mode·Oc·Oo·Ar·char\|·Ns·Ic·=·Ns·Ar·c·Oc |
108 | Control·which·tty·modes·that | 246 | Control·which·tty·modes·that |
| 247 | .Nm |
109 | won't·allow·the·user·to·change. | 248 | won't·allow·the·user·to·change. |
| 249 | .Fl·d·, |
| 250 | .Fl·q |
110 | or | 251 | or |
| 252 | .Fl·x |
111 | tells | 253 | tells |
| 254 | .Ic·setty |
112 | to·act·on·the | 255 | to·act·on·the |
| 256 | .Sq·edit·, |
| 257 | .Sq·quote |
113 | or | 258 | or |
| 259 | .Sq·execute |
114 | set·of·tty·modes·respectively;·defaulting·to | 260 | set·of·tty·modes·respectively;·defaulting·to |
| 261 | .Fl·x·. |
| 262 | .Pp |
115 | Without·other·arguments, | 263 | Without·other·arguments, |
| 264 | .Ic·setty |
116 | lists·the·modes·in·the·chosen·set·which·are·fixed·on | 265 | lists·the·modes·in·the·chosen·set·which·are·fixed·on |
| 266 | .Po |
| 267 | .Ic·+·Ns·Ar·mode |
| 268 | .Pc |
117 | or·off | 269 | or·off |
| 270 | .Po |
| 271 | .Fl·Ns·Ar·mode |
| 272 | .Pc·. |
| 273 | .Fl·a |
118 | lists·all·tty·modes·in·the·chosen·set·regardless·of·the·setting. | 274 | lists·all·tty·modes·in·the·chosen·set·regardless·of·the·setting. |
119 | With | 275 | With |
| 276 | .Ic·+·Ns·Ar·mode·, |
| 277 | .Fl·Ns·Ar·mode |
120 | or | 278 | or |
| 279 | .Ar·mode·, |
121 | fixes | 280 | fixes |
| 281 | .Ar·mode |
122 | on·or·off·or·removes·control·of | 282 | on·or·off·or·removes·control·of |
| 283 | .Ar·mode |
123 | in·the·chosen·set. | 284 | in·the·chosen·set. |
| 285 | .Pp |
| 286 | .Ic·Setty |
124 | can·also·be·used·to·set·tty·characters·to·particular·values·using | 287 | can·also·be·used·to·set·tty·characters·to·particular·values·using |
| 288 | .Ar·char\|·Ns·Ic·=·Ns·Ar·value·. |
125 | If | 289 | If |
| 290 | .Ar·value |
126 | is·empty | 291 | is·empty |
127 | then·the·character·is·set·to | 292 | then·the·character·is·set·to |
| 293 | .Dv·_POSIX_VDISABLE·. |
| 294 | .It·Ic·telltc |
128 | List·the·values·of·all·the·terminal·capabilities·(see | 295 | List·the·values·of·all·the·terminal·capabilities·(see |
| 296 | .Xr·termcap·5·)·. |
| 297 | .El |
| 298 | .Sh·ENVIRONMENT |
| 299 | .Bl·-tag·-width·Ev |
| 300 | .It·Ev·EDITRC |
129 | Names·the·default·configuration·file·for·the | 301 | Names·the·default·configuration·file·for·the |
| 302 | .Xr·editline·3 |
130 | library. | 303 | library. |
| 304 | .El |
| 305 | .Sh·FILES |
| 306 | .Bl·-tag·-width·Pa |
| 307 | .It·Pa·~/.editrc |
131 | Last·resort·user·configuration·file·for·the | 308 | Last·resort·user·configuration·file·for·the |
| 309 | .Xr·editline·3 |
132 | library·if·no·other·file·is·specified. | 310 | library·if·no·other·file·is·specified. |
| 311 | .El |
| 312 | .Sh·SEE·ALSO |
| 313 | .Xr·editline·3·, |
| 314 | .Xr·regex·3·, |
| 315 | .Xr·termcap·5·, |
| 316 | .Xr·editline·7 |
| 317 | .Sh·AUTHORS |
| 318 | .An·-nosplit |
133 | The | 319 | The |
| 320 | .Nm·editline |
134 | library·was·written·by | 321 | library·was·written·by |
| 322 | .An·Christos·Zoulas·, |
135 | and·this·manual·was·written·by | 323 | and·this·manual·was·written·by |
| 324 | .An·Luke·Mewburn·, |
136 | with·some·sections·inspired·by | 325 | with·some·sections·inspired·by |
| 326 | .Xr·tcsh·1·. |