Offset 1, 325 lines modifiedOffset 1, 314 lines modified
 1 .TH·EDITRC·5·"May·22,·2016"·""
1 .\"»    $NetBSD:·editrc.5,v·1.33·2017/06/27·01:22:58·kre·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 
32 .Sh·NAME2 .SH·NAME
33 .Nm·editrc3 \fBeditrc\fP
34 .Nd·configuration·file·for·editline·library4 \-·configuration·file·for·editline·library
35 .Sh·SYNOPSIS5 .SH·SYNOPSIS
36 .Nm6 .br
 7 \fBeditrc\fP
37 .Sh·DESCRIPTION8 .SH·DESCRIPTION
38 The9 The
39 .Nm10 \fBeditrc\fP
40 file·defines·various·settings·to·be·used·by·the11 file·defines·various·settings·to·be·used·by·the
41 .Xr·editline·312 \fBeditline\fP(3)
42 library.13 library.
43 .Pp 
44 The·format·of·each·line·is:14 The·format·of·each·line·is:
45 .Pp 
46 .Dl·[prog:]command·[arg·...]15 [prog:]command·[arg·...]
47 .Pp 
48 .Ar·command 
 16 \fIcommand\fP
49 is·one·of·the17 is·one·of·the
50 .Xr·editline·318 \fBeditline\fP(3)
51 builtin·commands.19 builtin·commands.
52 Refer·to20 Refer·to
53 .Sx·BUILTIN·COMMANDS21 .B·BUILTIN·COMMANDS
54 for·more·information.22 for·more·information.
55 .Pp 
56 .Ar·prog 
 23 \fIprog\fP
57 is·the·program·name·string·that·a·program·defines·when·it·calls24 is·the·program·name·string·that·a·program·defines·when·it·calls
58 .Xr·el_init·325 \fBel_init\fP(3)
59 to·set·up26 to·set·up
60 .Xr·editline·3·,27 \fBeditline\fP(3),
61 which·is·usually28 which·is·usually
62 .Va·argv[0]·. 
63 .Ar·command29 \fIargv[0]\fP.
 30 \fIcommand\fP
64 will·be·executed·for·any·program·which·matches31 will·be·executed·for·any·program·which·matches
65 .Ar·prog·. 
66 .Pp 
67 .Ar·prog32 \fIprog\fP.
  
 33 \fIprog\fP
68 may·also·be·a34 may·also·be·a
69 .Xr·regex·335 \fBregex\fP(3)
70 style36 style
71 regular·expression,·in·which·case37 regular·expression,·in·which·case
72 .Ar·command38 \fIcommand\fP
73 will·be·executed·for·any·program·that·matches·the·regular·expression.39 will·be·executed·for·any·program·that·matches·the·regular·expression.
74 .Pp 
75 If40 If
76 .Ar·prog41 \fIprog\fP
77 is·absent,42 is·absent,
78 .Ar·command43 \fIcommand\fP
79 is·executed·for·all·programs.44 is·executed·for·all·programs.
80 .Sh·BUILTIN·COMMANDS45 .SH·BUILTIN·COMMANDS
81 The46 The
82 .Nm·editline47 \fBeditline\fP
83 library·has·some·builtin·commands,·which·affect·the·way48 library·has·some·builtin·commands,·which·affect·the·way
84 that·the·line·editing·and·history·functions·operate.49 that·the·line·editing·and·history·functions·operate.
85 These·are·based·on·similar·named·builtins·present·in·the50 These·are·based·on·similar·named·builtins·present·in·the
86 .Xr·tcsh·151 \fBtcsh\fP(1)
87 shell.52 shell.
88 .Pp 
89 The·following·builtin·commands·are·available:53 The·following·builtin·commands·are·available:
90 .Bl·-tag·-width·4n 
91 .It·Ic·bind·Oo·Fl·aeklrsv·Oc·Op·Ar·key·Op·Ar·command54 .TP
 55 \fBbind·Oo·Fl·aeklrsv·Oc·[\fIkey\fP·[\fIcommand]]\fP\fP
92 Without·options·and·arguments,·list·all·bound·keys·and·macros,·and56 Without·options·and·arguments,·list·all·bound·keys·and·macros,·and
93 the·editor·command·or·input·string·to·which·each·one·is·bound.57 the·editor·command·or·input·string·to·which·each·one·is·bound.
94 If·only58 If·only
95 .Ar·key59 \fIkey\fP
96 is·supplied,·show·the·binding·for·that·key·or·macro.60 is·supplied,·show·the·binding·for·that·key·or·macro.
97 If61 If
98 .Ar·key·command62 \fIkey\fP·command
99 is·supplied,·bind·the·editor63 is·supplied,·bind·the·editor
100 .Ar·command64 \fIcommand\fP
101 to·that·key·or·macro.65 to·that·key·or·macro.
102 .Pp 
103 The·options·are·as·follows:66 The·options·are·as·follows:
104 .Bl·-tag·-width·4n 
105 .It·Fl·a67 .RS
 68 .TP
 69 \fB\-a\fP
106 List·or·change·key·bindings·in·the70 List·or·change·key·bindings·in·the
107 .Xr·vi·171 \fBvi\fP(1)
108 mode·alternate·(command·mode)·key·map.72 mode·alternate·(command·mode)·key·map.
109 .It·Fl·e73 .TP
 74 \fB\-e\fP
110 Bind·all·keys·to·the·standard·GNU·Emacs-like·bindings.75 Bind·all·keys·to·the·standard·GNU·Emacs-like·bindings.
111 .It·Fl·k 
112 .Ar·key76 .TP
 77 \fB\-k\fP
 78 \fIkey\fP
113 is·interpreted·as·a·symbolic·arrow·key·name,·which·may·be·one·of79 is·interpreted·as·a·symbolic·arrow·key·name,·which·may·be·one·of
114 .Sq·up·, 
115 .Sq·down·, 
116 .Sq·left80 `up',
 81 `down',
 82 `left'
117 or83 or
118 .Sq·right·. 
119 .It·Fl·l84 `right'.
 85 .TP
 86 \fB\-l\fP
120 List·all·editor·commands·and·a·short·description·of·each.87 List·all·editor·commands·and·a·short·description·of·each.
121 .It·Fl·r88 .TP
 89 \fB\-r\fP
122 Remove·the·binding·of·the·key·or·macro90 Remove·the·binding·of·the·key·or·macro
123 .Ar·key·. 
124 .It·Fl·s91 \fIkey\fP.
 92 .TP
 93 \fB\-s\fP
125 Define·a·keyboard·macro·rather·than·a·key·binding·or·command·macro:94 Define·a·keyboard·macro·rather·than·a·key·binding·or·command·macro:
126 .Ar·command95 \fIcommand\fP
127 is·taken·as·a·literal·string·and·appended·to·the·input·queue·whenever96 is·taken·as·a·literal·string·and·appended·to·the·input·queue·whenever
128 .Ar·key97 \fIkey\fP
129 is·typed.98 is·typed.
130 Bound·keys·and·macros·in99 Bound·keys·and·macros·in
131 .Ar·command100 \fIcommand\fP
132 are·themselves·reinterpreted,·and·this·continues·for·ten·levels·of101 are·themselves·reinterpreted,·and·this·continues·for·ten·levels·of
133 interpretation.102 interpretation.
134 .It·Fl·v103 .TP
 104 \fB\-v\fP
135 Bind·all·keys·to·the·standard105 Bind·all·keys·to·the·standard
136 .Xr·vi·1·Ns·-like106 \fBvi\fP(1)·-like
137 bindings.107 bindings.
138 .El 
139 .Pp108 .RE
  
140 The109 The
141 .Xr·editline·7110 \fBeditline\fP(7)
142 manual·documents·all·editor·commands·and·contains·more·information111 manual·documents·all·editor·commands·and·contains·more·information
143 about·macros·and·the·input·queue.112 about·macros·and·the·input·queue.
144 .Pp 
145 .Ar·key 
 113 \fIkey\fP
146 and114 and
147 .Ar·command115 \fIcommand\fP
148 can·contain·control·characters·of·the·form116 can·contain·control·characters·of·the·form
 117 `No'^\fIcharacter\fP
 118 (
149 .Sm·off 
150 .Sq·No·^·Ar·character 
151 .Sm·on 
152 .Po 
153 e.g.\&119 e.g.\&
154 .Sq·^A 
155 .Pc·,120 `^A'
 121 ),
156 and·the·following·backslashed·escape·sequences:122 and·the·following·backslashed·escape·sequences:
157 .Pp 
158 .Bl·-tag·-compact·-offset·indent·-width·4n 
159 .It·Ic·\ea 
 123 .RS
 124 .TP
 125 \fB\ea\fP
160 Bell126 Bell
161 .It·Ic·\eb127 .TP
 128 \fB\eb\fP
162 Backspace129 Backspace
163 .It·Ic·\ee130 .TP
 131 \fB\ee\fP
164 Escape132 Escape
165 .It·Ic·\ef133 .TP
 134 \fB\ef\fP
166 Formfeed135 Formfeed
167 .It·Ic·\en136 .TP
 137 \fB\en\fP
168 Newline138 Newline
169 .It·Ic·\er139 .TP
 140 \fB\er\fP
170 Carriage·return141 Carriage·return
171 .It·Ic·\et142 .TP
 143 \fB\et\fP
172 Horizontal·tab144 Horizontal·tab
173 .It·Ic·\ev145 .TP
 146 \fB\ev\fP
174 Vertical·tab147 Vertical·tab
175 .Sm·off148 .TP
176 .It·Sy·\e·Ar·nnn149 .B·\e·Ar·nnn
177 .Sm·on 
178 The·ASCII·character·corresponding·to·the·octal·number150 The·ASCII·character·corresponding·to·the·octal·number
179 .Ar·nnn·. 
180 .El 
181 .Pp 
182 .Sq·\e151 \fInnn\fP.
 152 .RE
  
 153 `\e'
183 nullifies·the·special·meaning·of·the·following·character,154 nullifies·the·special·meaning·of·the·following·character,
184 if·it·has·any,·notably155 if·it·has·any,·notably
185 .Sq·\e156 `\e'
186 and157 and
187 .Sq·^·. 
188 .It·Ic·echotc·Oo·Fl·sv·Oc·Ar·arg·Ar·...158 `^'.
 159 .TP
 160 \fBechotc·Oo·Fl·sv·Oc·\fIarg\fP·\fI...\fP\fP
189 Exercise·terminal·capabilities·given·in161 Exercise·terminal·capabilities·given·in
190 .Ar·arg·...·.162 \fIarg\fP...·.
191 If163 If
192 .Ar·arg164 \fIarg\fP
193 is165 is
194 .Sq·baud·, 
195 .Sq·cols·, 
196 .Sq·lines·, 
197 .Sq·rows·, 
198 .Sq·meta·,166 `baud',
 167 `cols',
 168 `lines',
 169 `rows',
 170 `meta',
199 or171 or
200 .Sq·tabs·,172 `tabs',
201 the·value·of·that·capability·is·printed,·with173 the·value·of·that·capability·is·printed,·with
202 .Dq·yes174 ``yes''
203 or175 or
204 .Dq·no176 ``no''
205 indicating·that·the·terminal·does·or·does·not·have·that·capability.177 indicating·that·the·terminal·does·or·does·not·have·that·capability.
206 .Pp 
207 .Fl·s 
 178 \fB\-s\fP
208 returns·an·empty·string·for·non-existent·capabilities,·rather·than179 returns·an·empty·string·for·non-existent·capabilities,·rather·than
209 causing·an·error.180 causing·an·error.
210 .Fl·v181 \fB\-v\fP
211 causes·messages·to·be·verbose.182 causes·messages·to·be·verbose.
212 .It·Ic·edit·Op·Li·on·|·Li·off183 .TP
 184 \fBedit·[Li·on·|·Li·off]\fP
213 Enable·or·disable·the185 Enable·or·disable·the
214 .Nm·editline186 \fBeditline\fP
215 functionality·in·a·program.187 functionality·in·a·program.
216 .It·Ic·history·Ar·list·|·Ar·size·Dv·n·|·Ar·unique·Dv·n188 .TP
 189 \fBhistory·\fIlist\fP·|·\fIsize\fP·Dv·n·|·\fIunique\fP·Dv·n\fP
217 The190 The
218 .Ar·list191 \fIlist\fP
219 command·lists·all·entries·in·the·history.192 command·lists·all·entries·in·the·history.
220 The193 The
221 .Ar·size194 \fIsize\fP
222 command·sets·the·history·size·to195 command·sets·the·history·size·to
223 .Dv·n196 n
224 entries.197 entries.
225 The198 The
226 .Ar·unique199 \fIunique\fP
227 command·controls·if·history·should·keep·duplicate·entries.200 command·controls·if·history·should·keep·duplicate·entries.
228 If201 If
229 .Dv·n202 n
230 is·non·zero,·only·keep·unique·history·entries.203 is·non·zero,·only·keep·unique·history·entries.
231 If204 If
232 .Dv·n205 n
233 is·zero,·then·keep·all·entries·(the·default).206 is·zero,·then·keep·all·entries·(the·default).
234 .It·Ic·settc·Ar·cap·Ar·val207 .TP
 208 \fBsettc·\fIcap\fP·\fIval\fP\fP
235 Set·the·terminal·capability209 Set·the·terminal·capability
236 .Ar·cap210 \fIcap\fP
237 to211 to
238 .Ar·val·,212 \fIval\fP,
239 as·defined·in213 as·defined·in
240 .Xr·termcap·5·.214 \fBtermcap\fP(5).
241 No·sanity·checking·is·done.215 No·sanity·checking·is·done.
 216 .TP
242 .It·Ic·setty·Oo·Fl·a·Oc·Oo·Fl·d·Oc·Oo·Fl·q·Oc·Oo·Fl·x·Oc·Oo·Ar·+mode·Oc·\217 \fBsetty·Oo·Fl·a·Oc·Oo·Fl·d·Oc·Oo·Fl·q·Oc·Oo·Fl·x·Oc·Oo·\fI+mode\fP·Oc·\\fP
243 Oo·Ar·-mode·Oc·Oo·Ar·mode·Oc·Oo·Ar·char=c·Oc218 Oo·Ar·-mode·Oc·Oo·Ar·mode·Oc·Oo·Ar·char=c·Oc
244 Control·which·tty·modes·that219 Control·which·tty·modes·that
245 .Nm220 \fBeditrc\fP
246 won't·allow·the·user·to·change.221 won't·allow·the·user·to·change.
247 .Fl·d·, 
248 .Fl·q222 \fB\-d\fP,
 223 \fB\-q\fP
249 or224 or
250 .Fl·x225 \fB\-x\fP
251 tells226 tells
252 .Ic·setty227 \fBsetty\fP
253 to·act·on·the228 to·act·on·the
254 .Sq·edit·, 
255 .Sq·quote229 `edit',
 230 `quote'
256 or231 or
257 .Sq·execute232 `execute'
258 set·of·tty·modes·respectively;·defaulting·to233 set·of·tty·modes·respectively;·defaulting·to
259 .Fl·x·. 
260 .Pp234 \fB\-x\fP.
  
261 Without·other·arguments,235 Without·other·arguments,
262 .Ic·setty236 \fBsetty\fP
263 lists·the·modes·in·the·chosen·set·which·are·fixed·on237 lists·the·modes·in·the·chosen·set·which·are·fixed·on
264 .Po 
265 .Sq·+mode 
266 .Pc238 (
 239 `+mode'
 240 )
267 or·off241 or·off
268 .Po 
269 .Sq·-mode 
270 .Pc·. 
271 .Fl·a242 (
 243 `-mode'
 244 ).
 245 \fB\-a\fP
272 lists·all·tty·modes·in·the·chosen·set·regardless·of·the·setting.246 lists·all·tty·modes·in·the·chosen·set·regardless·of·the·setting.
273 With247 With
274 .Ar·+mode·, 
275 .Ar·-mode248 \fI+mode\fP,
 249 \fI-mode\fP
276 or250 or
277 .Ar·mode·,251 \fImode\fP,
278 fixes252 fixes
279 .Ar·mode253 \fImode\fP
280 on·or·off·or·removes·control·of254 on·or·off·or·removes·control·of
281 .Ar·mode255 \fImode\fP
282 in·the·chosen·set.256 in·the·chosen·set.
283 .Pp 
284 .Ic·Setty 
 257 \fBSetty\fP
285 can·also·be·used·to·set·tty·characters·to·particular·values·using258 can·also·be·used·to·set·tty·characters·to·particular·values·using
286 .Ar·char=value·.259 \fIchar=value\fP.
287 If260 If
288 .Ar·value261 \fIvalue\fP
289 is·empty262 is·empty
290 then·the·character·is·set·to263 then·the·character·is·set·to
291 .Dv·_POSIX_VDISABLE·.264 _POSIX_VDISABLE·.
292 .It·Ic·telltc265 .TP
 266 \fBtelltc\fP
293 List·the·values·of·all·the·terminal·capabilities·(see267 List·the·values·of·all·the·terminal·capabilities·(see
 268 \fBtermcap\fP(5))·.
294 .Xr·termcap·5·)·. 
295 .El 
296 .Sh·ENVIRONMENT269 .SH·ENVIRONMENT
297 .Bl·-tag·-width·"~/.editrcXXX" 
298 .It·Ev·EDITRC270 .TP
 271 .B·EDITRC
299 Names·the·default·configuration·file·for·the272 Names·the·default·configuration·file·for·the
300 .Xr·editline·3273 \fBeditline\fP(3)
301 library.274 library.
302 .El 
303 .Sh·FILES275 .SH·FILES
304 .Bl·-tag·-width·"~/.editrcXXX"276 .TP
305 .It·Pa·~/.editrc277 .B·~/.editrc
306 Last·resort,·if·no·other·file·is·specified,278 Last·resort,·if·no·other·file·is·specified,
307 user·configuration·file·for·the279 user·configuration·file·for·the
308 .Xr·editline·3280 \fBeditline\fP(3)
309 library.281 library.
310 .El 
311 .Sh·SEE·ALSO282 .SH·SEE·ALSO
312 .Xr·editline·3·, 
313 .Xr·regex·3·, 
314 .Xr·termcap·5·, 
315 .Xr·editline·7283 \fBeditline\fP(3),
 284 \fBregex\fP(3),
 285 \fBtermcap\fP(5),
 286 \fBeditline\fP(7)
316 .Sh·AUTHORS287 .SH·AUTHORS
  
317 .An·-nosplit288 -nosplit
318 The289 The
319 .Nm·editline290 \fBeditline\fP
320 library·was·written·by291 library·was·written·by
  
321 .An·Christos·Zoulas·,292 Christos·Zoulas·,
322 and·this·manual·was·written·by293 and·this·manual·was·written·by
  
323 .An·Luke·Mewburn·,294 Luke·Mewburn·,
324 with·some·sections·inspired·by295 with·some·sections·inspired·by
325 .Xr·tcsh·1·.296 \fBtcsh\fP(1).