1 .\" $NetBSD: editrc.5,v 1.24 2009/04/11 22:17:52 wiz Exp $
3 .\" Copyright (c) 1997-2000 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" This file was contributed to The NetBSD Foundation by Luke Mewburn.
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
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 .\" 3. Neither the name of The NetBSD Foundation nor the names of its
17 .\" contributors may be used to endorse or promote products derived
18 .\" from this software without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
21 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
24 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 .\" POSSIBILITY OF SUCH DAMAGE.
39 .Nd configuration file for editline library
45 file defines various settings to be used by the
49 The format of each line is:
50 .Dl [prog:]command [arg [...]]
61 is the program name string that a program defines when it calls
68 will be executed for any program which matches
75 regular expression, in which case
77 will be executed for any program that matches the regular expression.
83 is executed for all programs.
87 library has some builtin commands, which affect the way
88 that the line editing and history functions operate.
89 These are based on similar named builtins present in the
93 The following builtin commands are available:
95 .It Ic bind Oo Fl a Oc Oo Fl e Oc Oo Fl k Oc Oo Fl l Oc Oo Fl r Oc \
96 Oo Fl s Oc Oo Fl v Oc Oo Ar key Oo Ar command Oc Oc
97 Without options, list all bound keys, and the editor command to which
101 is supplied, show the bindings for
112 Bind all keys to the standard GNU Emacs-like bindings.
114 Bind all keys to the standard
118 List or change key bindings in the
120 mode alternate (command mode) key map.
123 is interpreted as a symbolic arrow key name, which may be one of
130 List all editor commands and a short description of each.
132 Remove a key's binding.
135 is taken as a literal string and treated as terminal input when
140 are themselves reinterpreted, and this continues for ten levels of
145 may be one of the commands documented in
146 .Sx "EDITOR COMMANDS"
147 below, or another key.
152 can contain control characters of the form
154 .Sq No ^ Ar character
158 and the following backslashed escape sequences:
160 .Bl -tag -compact -offset indent -width 4n
180 The ASCII character corresponding to the octal number
185 nullifies the special meaning of the following character,
186 if it has any, notably
190 .It Ic echotc Oo Fl sv Oc Ar arg Ar ...
191 Exercise terminal capabilities given in
202 the value of that capability is printed, with
206 indicating that the terminal does or does not have that capability.
209 returns an empty string for non-existent capabilities, rather than
212 causes messages to be verbose.
213 .It Ic edit Op Cm on | off
214 Enable or disable the
216 functionality in a program.
217 .It Ic history Ar list | Ar size Dv n | Ar unique Dv n
220 command lists all entries in the history.
223 command sets the history size to
228 command controls if history should keep duplicate entries.
231 is non zero, only keep unique history entries.
234 is zero, then keep all entries (the default).
236 List the values of all the terminal capabilities (see
238 .It Ic settc Ar cap Ar val
239 Set the terminal capability
245 No sanity checking is done.
246 .It Ic setty Oo Fl a Oc Oo Fl d Oc Oo Fl q Oc Oo Fl x Oc Oo Ar +mode Oc \
247 Oo Ar -mode Oc Oo Ar mode Oc Oo Ar char=c Oc
248 Control which tty modes that
250 will not allow the user to change.
262 set of tty modes respectively; defaulting to
265 Without other arguments,
267 lists the modes in the chosen set which are fixed on
272 lists all tty modes in the chosen set regardless of the setting.
280 on or off or removes control of
285 can also be used to set tty characters to particular values using
290 then the character is set to
291 .Dv _POSIX_VDISABLE .
294 The following editor commands are available for use in key bindings:
295 .\" Section automatically generated with makelist
298 Vi paste previous deletion to the right of the cursor.
300 Vi paste previous deletion to the left of the cursor.
301 .It Ic vi-prev-space-word
302 Vi move to the previous space delimited word.
304 Vi move to the previous word.
305 .It Ic vi-next-space-word
306 Vi move to the next space delimited word.
308 Vi move to the next word.
309 .It Ic vi-change-case
310 Vi change case of character under the cursor and advance one character.
311 .It Ic vi-change-meta
312 Vi change prefix command.
313 .It Ic vi-insert-at-bol
314 Vi enter insert mode at the beginning of line.
315 .It Ic vi-replace-char
316 Vi replace character under the cursor with the next character typed.
317 .It Ic vi-replace-mode
318 Vi enter replace mode.
319 .It Ic vi-substitute-char
320 Vi replace character under the cursor and enter insert mode.
321 .It Ic vi-substitute-line
322 Vi substitute entire line.
323 .It Ic vi-change-to-eol
324 Vi change to end of line.
326 Vi enter insert mode.
328 Vi enter insert mode after the cursor.
330 Vi enter insert mode at end of line.
331 .It Ic vi-delete-meta
332 Vi delete prefix command.
334 Vi move to the end of the current space delimited word.
335 .It Ic vi-to-end-word
336 Vi move to the end of the current word.
339 .It Ic vi-command-mode
340 Vi enter command mode (use alternative key bindings).
342 Vi move to the beginning of line.
343 .It Ic vi-delete-prev-char
344 Vi move to previous character (backspace).
345 .It Ic vi-list-or-eof
346 Vi list choices for completion or indicate end of file if empty line.
347 .It Ic vi-kill-line-prev
348 Vi cut from beginning of line to cursor.
349 .It Ic vi-search-prev
350 Vi search history previous.
351 .It Ic vi-search-next
352 Vi search history next.
353 .It Ic vi-repeat-search-next
354 Vi repeat current search in the same search direction.
355 .It Ic vi-repeat-search-prev
356 Vi repeat current search in the opposite search direction.
358 Vi move to the character specified next.
360 Vi move to the character specified previous.
361 .It Ic vi-to-next-char
362 Vi move up to the character specified next.
363 .It Ic vi-to-prev-char
364 Vi move up to the character specified previous.
365 .It Ic vi-repeat-next-char
366 Vi repeat current character search in the same search direction.
367 .It Ic vi-repeat-prev-char
368 Vi repeat current character search in the opposite search direction.
369 .It Ic em-delete-or-list
370 Delete character under cursor or list completions if at end of line.
371 .It Ic em-delete-next-word
372 Cut from cursor to end of current word.
374 Paste cut buffer at cursor position.
376 Cut the entire line and save in cut buffer.
377 .It Ic em-kill-region
378 Cut area between mark and cursor and save in cut buffer.
379 .It Ic em-copy-region
380 Copy area between mark and cursor to cut buffer.
381 .It Ic em-gosmacs-transpose
382 Exchange the two characters before the cursor.
384 Move next to end of current word.
386 Uppercase the characters from cursor to end of current word.
387 .It Ic em-capitol-case
388 Capitalize the characters from cursor to end of current word.
390 Lowercase the characters from cursor to end of current word.
392 Set the mark at cursor.
393 .It Ic em-exchange-mark
394 Exchange the cursor and mark.
395 .It Ic em-universal-argument
396 Universal argument (argument times 4).
398 Add 8th bit to next character typed.
399 .It Ic em-toggle-overwrite
400 Switch from insert to overwrite mode or vice versa.
401 .It Ic em-copy-prev-word
402 Copy current word to cursor.
403 .It Ic em-inc-search-next
404 Emacs incremental next search.
405 .It Ic em-inc-search-prev
406 Emacs incremental reverse search.
407 .It Ic ed-end-of-file
408 Indicate end of file.
410 Add character to the line.
411 .It Ic ed-delete-prev-word
412 Delete from beginning of current word to cursor.
413 .It Ic ed-delete-next-char
414 Delete character under cursor.
416 Cut to the end of line.
417 .It Ic ed-move-to-end
418 Move cursor to the end of line.
419 .It Ic ed-move-to-beg
420 Move cursor to the beginning of line.
421 .It Ic ed-transpose-chars
422 Exchange the character to the left of the cursor with the one under it.
424 Move to the right one character.
426 Move to the beginning of the current word.
428 Move to the left one character.
429 .It Ic ed-quoted-insert
430 Add the next character typed verbatim.
432 Adds to argument or enters a digit.
433 .It Ic ed-argument-digit
434 Digit that starts argument.
436 Indicates unbound character.
438 Tty interrupt character.
440 Tty delayed suspend character.
441 .It Ic ed-tty-flush-output
442 Tty flush output characters.
443 .It Ic ed-tty-sigquit
445 .It Ic ed-tty-sigtstp
446 Tty suspend character.
447 .It Ic ed-tty-stop-output
448 Tty disallow output characters.
449 .It Ic ed-tty-start-output
450 Tty allow output characters.
453 .It Ic ed-delete-prev-char
454 Delete the character to the left of the cursor.
455 .It Ic ed-clear-screen
456 Clear screen leaving current line at the top.
458 Redisplay everything.
460 Erase current line and start from scratch.
461 .It Ic ed-sequence-lead-in
462 First character in a bound sequence.
463 .It Ic ed-prev-history
464 Move to the previous history line.
465 .It Ic ed-next-history
466 Move to the next history line.
467 .It Ic ed-search-prev-history
468 Search previous in history for a line matching the current.
469 .It Ic ed-search-next-history
470 Search next in history for a line matching the current.
476 Editline extended command.
478 .\" End of section automatically generated with makelist
487 library was written by
488 .An Christos Zoulas ,
489 and this manual was written by
491 with some sections inspired by