kernel/arm: send SIGSEGV to processes
[minix3.git] / lib / libedit / editrc.5
blob9f796c772e68fb87a8fa8cd464550909d5ab1614
1 .\"     $NetBSD: editrc.5,v 1.29 2014/12/25 13:39:41 wiz 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 December 25, 2014
30 .Dt EDITRC 5
31 .Os
32 .Sh NAME
33 .Nm editrc
34 .Nd configuration file for editline library
35 .Sh SYNOPSIS
36 .Nm
37 .Sh DESCRIPTION
38 The
39 .Nm
40 file defines various settings to be used by the
41 .Xr editline 3
42 library.
43 .Pp
44 The format of each line is:
45 .Pp
46 .Dl [prog:]command [arg ...]
47 .Pp
48 .Ar command
49 is one of the
50 .Xr editline 3
51 builtin commands.
52 Refer to
53 .Sx BUILTIN COMMANDS
54 for more information.
55 .Pp
56 .Ar prog
57 is the program name string that a program defines when it calls
58 .Xr el_init 3
59 to set up
60 .Xr editline 3 ,
61 which is usually
62 .Va argv[0] .
63 .Ar command
64 will be executed for any program which matches
65 .Ar prog .
66 .Pp
67 .Ar prog
68 may also be a
69 .Xr regex 3
70 style
71 regular expression, in which case
72 .Ar command
73 will be executed for any program that matches the regular expression.
74 .Pp
76 .Ar prog
77 is absent,
78 .Ar command
79 is executed for all programs.
80 .Sh BUILTIN COMMANDS
81 The
82 .Nm editline
83 library has some builtin commands, which affect the way
84 that the line editing and history functions operate.
85 These are based on similar named builtins present in the
86 .Xr tcsh 1
87 shell.
88 .Pp
89 The following builtin commands are available:
90 .Bl -tag -width 4n
91 .It Ic bind Oo Fl a Oc Oo Fl e Oc Oo Fl k Oc Oo Fl l Oc Oo Fl r Oc \
92 Oo Fl s Oc Oo Fl v Oc Oo Ar key Oo Ar command Oc Oc
93 Without options, list all bound keys, and the editor command to which
94 each is bound.
96 .Ar key
97 is supplied, show the bindings for
98 .Ar key .
100 .Ar key command
101 is supplied, bind
102 .Ar command
104 .Ar key .
105 Options include:
106 .Bl -tag -width 4n
107 .It Fl a
108 List or change key bindings in the
109 .Xr vi 1
110 mode alternate (command mode) key map.
111 .It Fl e
112 Bind all keys to the standard GNU Emacs-like bindings.
113 .It Fl k
114 .Ar key
115 is interpreted as a symbolic arrow key name, which may be one of
116 .Sq up ,
117 .Sq down ,
118 .Sq left
120 .Sq right .
121 .It Fl l
122 List all editor commands and a short description of each.
123 .It Fl r
124 Remove a key's binding.
125 .It Fl s
126 .Ar command
127 is taken as a literal string and treated as terminal input when
128 .Ar key
129 is typed.
130 Bound keys in
131 .Ar command
132 are themselves reinterpreted, and this continues for ten levels of
133 interpretation.
134 .It Fl v
135 Bind all keys to the standard
136 .Xr vi 1 Ns -like
137 bindings.
140 .Ar command
141 may be one of the commands documented in
142 .Sx "EDITOR COMMANDS"
143 below, or another key.
145 .Ar key
147 .Ar command
148 can contain control characters of the form
149 .Sm off
150 .Sq No ^ Ar character
151 .Sm on
153 e.g.\&
154 .Sq ^A
155 .Pc ,
156 and the following backslashed escape sequences:
158 .Bl -tag -compact -offset indent -width 4n
159 .It Ic \ea
160 Bell
161 .It Ic \eb
162 Backspace
163 .It Ic \ee
164 Escape
165 .It Ic \ef
166 Formfeed
167 .It Ic \en
168 Newline
169 .It Ic \er
170 Carriage return
171 .It Ic \et
172 Horizontal tab
173 .It Ic \ev
174 Vertical tab
175 .Sm off
176 .It Sy \e Ar nnn
177 .Sm on
178 The ASCII character corresponding to the octal number
179 .Ar nnn .
182 .Sq \e
183 nullifies the special meaning of the following character,
184 if it has any, notably
185 .Sq \e
187 .Sq ^ .
188 .It Ic echotc Oo Fl sv Oc Ar arg Ar ...
189 Exercise terminal capabilities given in
190 .Ar arg ... .
192 .Ar arg
194 .Sq baud ,
195 .Sq cols ,
196 .Sq lines ,
197 .Sq rows ,
198 .Sq meta ,
200 .Sq tabs ,
201 the value of that capability is printed, with
202 .Dq yes
204 .Dq no
205 indicating that the terminal does or does not have that capability.
207 .Fl s
208 returns an empty string for non-existent capabilities, rather than
209 causing an error.
210 .Fl v
211 causes messages to be verbose.
212 .It Ic edit Op Li on | Li off
213 Enable or disable the
214 .Nm editline
215 functionality in a program.
216 .It Ic history Ar list | Ar size Dv n | Ar unique Dv n
218 .Ar list
219 command lists all entries in the history.
221 .Ar size
222 command sets the history size to
223 .Dv n
224 entries.
226 .Ar unique
227 command controls if history should keep duplicate entries.
229 .Dv n
230 is non zero, only keep unique history entries.
232 .Dv n
233 is zero, then keep all entries (the default).
234 .It Ic settc Ar cap Ar val
235 Set the terminal capability
236 .Ar cap
238 .Ar val ,
239 as defined in
240 .Xr termcap 5 .
241 No sanity checking is done.
242 .It Ic setty Oo Fl a Oc Oo Fl d Oc Oo Fl q Oc Oo Fl x Oc Oo Ar +mode Oc \
243 Oo Ar -mode Oc Oo Ar mode Oc Oo Ar char=c Oc
244 Control which tty modes that
246 won't allow the user to change.
247 .Fl d ,
248 .Fl q
250 .Fl x
251 tells
252 .Ic setty
253 to act on the
254 .Sq edit ,
255 .Sq quote
257 .Sq execute
258 set of tty modes respectively; defaulting to
259 .Fl x .
261 Without other arguments,
262 .Ic setty
263 lists the modes in the chosen set which are fixed on
265 .Sq +mode
267 or off
269 .Sq -mode
270 .Pc .
271 .Fl a
272 lists all tty modes in the chosen set regardless of the setting.
273 With
274 .Ar +mode ,
275 .Ar -mode
277 .Ar mode ,
278 fixes
279 .Ar mode
280 on or off or removes control of
281 .Ar mode
282 in the chosen set.
284 .Ic Setty
285 can also be used to set tty characters to particular values using
286 .Ar char=value .
288 .Ar value
289 is empty
290 then the character is set to
291 .Dv _POSIX_VDISABLE .
292 .It Ic telltc
293 List the values of all the terminal capabilities (see
294 .Xr termcap 5 ) .
296 .Sh EDITOR COMMANDS
297 The following editor commands are available for use in key bindings:
298 .\" Section automatically generated with makelist
299 .Bl -tag -width 4n
300 .It Ic vi-paste-next
301 Vi paste previous deletion to the right of the cursor.
302 .It Ic vi-paste-prev
303 Vi paste previous deletion to the left of the cursor.
304 .It Ic vi-prev-big-word
305 Vi move to the previous space delimited word.
306 .It Ic vi-prev-word
307 Vi move to the previous word.
308 .It Ic vi-next-big-word
309 Vi move to the next space delimited word.
310 .It Ic vi-next-word
311 Vi move to the next word.
312 .It Ic vi-change-case
313 Vi change case of character under the cursor and advance one character.
314 .It Ic vi-change-meta
315 Vi change prefix command.
316 .It Ic vi-insert-at-bol
317 Vi enter insert mode at the beginning of line.
318 .It Ic vi-replace-char
319 Vi replace character under the cursor with the next character typed.
320 .It Ic vi-replace-mode
321 Vi enter replace mode.
322 .It Ic vi-substitute-char
323 Vi replace character under the cursor and enter insert mode.
324 .It Ic vi-substitute-line
325 Vi substitute entire line.
326 .It Ic vi-change-to-eol
327 Vi change to end of line.
328 .It Ic vi-insert
329 Vi enter insert mode.
330 .It Ic vi-add
331 Vi enter insert mode after the cursor.
332 .It Ic vi-add-at-eol
333 Vi enter insert mode at end of line.
334 .It Ic vi-delete-meta
335 Vi delete prefix command.
336 .It Ic vi-end-big-word
337 Vi move to the end of the current space delimited word.
338 .It Ic vi-end-word
339 Vi move to the end of the current word.
340 .It Ic vi-undo
341 Vi undo last change.
342 .It Ic vi-command-mode
343 Vi enter command mode (use alternative key bindings).
344 .It Ic vi-zero
345 Vi move to the beginning of line.
346 .It Ic vi-delete-prev-char
347 Vi move to previous character (backspace).
348 .It Ic vi-list-or-eof
349 Vi list choices for completion or indicate end of file if empty line.
350 .It Ic vi-kill-line-prev
351 Vi cut from beginning of line to cursor.
352 .It Ic vi-search-prev
353 Vi search history previous.
354 .It Ic vi-search-next
355 Vi search history next.
356 .It Ic vi-repeat-search-next
357 Vi repeat current search in the same search direction.
358 .It Ic vi-repeat-search-prev
359 Vi repeat current search in the opposite search direction.
360 .It Ic vi-next-char
361 Vi move to the character specified next.
362 .It Ic vi-prev-char
363 Vi move to the character specified previous.
364 .It Ic vi-to-next-char
365 Vi move up to the character specified next.
366 .It Ic vi-to-prev-char
367 Vi move up to the character specified previous.
368 .It Ic vi-repeat-next-char
369 Vi repeat current character search in the same search direction.
370 .It Ic vi-repeat-prev-char
371 Vi repeat current character search in the opposite search direction.
372 .It Ic vi-match
373 Vi go to matching () {} or [].
374 .It Ic vi-undo-line
375 Vi undo all changes to line.
376 .It Ic vi-to-column
377 Vi go to specified column.
378 .It Ic vi-yank-end
379 Vi yank to end of line.
380 .It Ic vi-yank
381 Vi yank.
382 .It Ic vi-comment-out
383 Vi comment out current command.
384 .It Ic vi-alias
385 Vi include shell alias.
386 .It Ic vi-to-history-line
387 Vi go to specified history file line..
388 .It Ic vi-histedit
389 Vi edit history line with vi.
390 .It Ic vi-history-word
391 Vi append word from previous input line.
392 .It Ic vi-redo
393 Vi redo last non-motion command.
394 .It Ic em-delete-or-list
395 Delete character under cursor or list completions if at end of line.
396 .It Ic em-delete-next-word
397 Cut from cursor to end of current word.
398 .It Ic em-yank
399 Paste cut buffer at cursor position.
400 .It Ic em-kill-line
401 Cut the entire line and save in cut buffer.
402 .It Ic em-kill-region
403 Cut area between mark and cursor and save in cut buffer.
404 .It Ic em-copy-region
405 Copy area between mark and cursor to cut buffer.
406 .It Ic em-gosmacs-transpose
407 Exchange the two characters before the cursor.
408 .It Ic em-next-word
409 Move next to end of current word.
410 .It Ic em-upper-case
411 Uppercase the characters from cursor to end of current word.
412 .It Ic em-capitol-case
413 Capitalize the characters from cursor to end of current word.
414 .It Ic em-lower-case
415 Lowercase the characters from cursor to end of current word.
416 .It Ic em-set-mark
417 Set the mark at cursor.
418 .It Ic em-exchange-mark
419 Exchange the cursor and mark.
420 .It Ic em-universal-argument
421 Universal argument (argument times 4).
422 .It Ic em-meta-next
423 Add 8th bit to next character typed.
424 .It Ic em-toggle-overwrite
425 Switch from insert to overwrite mode or vice versa.
426 .It Ic em-copy-prev-word
427 Copy current word to cursor.
428 .It Ic em-inc-search-next
429 Emacs incremental next search.
430 .It Ic em-inc-search-prev
431 Emacs incremental reverse search.
432 .It Ic ed-end-of-file
433 Indicate end of file.
434 .It Ic ed-insert
435 Add character to the line.
436 .It Ic ed-delete-prev-word
437 Delete from beginning of current word to cursor.
438 .It Ic ed-delete-next-char
439 Delete character under cursor.
440 .It Ic ed-kill-line
441 Cut to the end of line.
442 .It Ic ed-move-to-end
443 Move cursor to the end of line.
444 .It Ic ed-move-to-beg
445 Move cursor to the beginning of line.
446 .It Ic ed-transpose-chars
447 Exchange the character to the left of the cursor with the one under it.
448 .It Ic ed-next-char
449 Move to the right one character.
450 .It Ic ed-prev-word
451 Move to the beginning of the current word.
452 .It Ic ed-prev-char
453 Move to the left one character.
454 .It Ic ed-quoted-insert
455 Add the next character typed verbatim.
456 .It Ic ed-digit
457 Adds to argument or enters a digit.
458 .It Ic ed-argument-digit
459 Digit that starts argument.
460 .It Ic ed-unassigned
461 Indicates unbound character.
462 .It Ic ed-tty-sigint
463 Tty interrupt character.
464 .It Ic ed-tty-dsusp
465 Tty delayed suspend character.
466 .It Ic ed-tty-flush-output
467 Tty flush output characters.
468 .It Ic ed-tty-sigquit
469 Tty quit character.
470 .It Ic ed-tty-sigtstp
471 Tty suspend character.
472 .It Ic ed-tty-stop-output
473 Tty disallow output characters.
474 .It Ic ed-tty-start-output
475 Tty allow output characters.
476 .It Ic ed-newline
477 Execute command.
478 .It Ic ed-delete-prev-char
479 Delete the character to the left of the cursor.
480 .It Ic ed-clear-screen
481 Clear screen leaving current line at the top.
482 .It Ic ed-redisplay
483 Redisplay everything.
484 .It Ic ed-start-over
485 Erase current line and start from scratch.
486 .It Ic ed-sequence-lead-in
487 First character in a bound sequence.
488 .It Ic ed-prev-history
489 Move to the previous history line.
490 .It Ic ed-next-history
491 Move to the next history line.
492 .It Ic ed-search-prev-history
493 Search previous in history for a line matching the current.
494 .It Ic ed-search-next-history
495 Search next in history for a line matching the current.
496 .It Ic ed-prev-line
497 Move up one line.
498 .It Ic ed-next-line
499 Move down one line.
500 .It Ic ed-command
501 Editline extended command.
503 .\" End of section automatically generated with makelist
504 .Sh FILES
505 .Bl -tag -width "~/.editrcXXX"
506 .It Pa ~/.editrc
507 User configuration file for the
508 .Xr editline 3
509 library.
511 .Sh SEE ALSO
512 .Xr editline 3 ,
513 .Xr regex 3 ,
514 .Xr termcap 5
515 .Sh AUTHORS
516 .An -nosplit
518 .Nm editline
519 library was written by
520 .An Christos Zoulas ,
521 and this manual was written by
522 .An Luke Mewburn ,
523 with some sections inspired by
524 .Xr tcsh 1 .