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.
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.
34 .Nd configuration file for editline library
40 file defines various settings to be used by the
44 The format of each line is:
45 .Dl [prog:]command [arg [...]]
56 is the program name string that a program defines when it calls
63 will be executed for any program which matches
70 regular expression, in which case
72 will be executed for any program that matches the regular expression.
78 is executed for all programs.
82 library has some builtin commands, which affect the way
83 that the line editing and history functions operate.
84 These are based on similar named builtins present in the
88 The following builtin commands are available:
90 .It Ic bind Oo Fl a Oc Oo Fl e Oc Oo Fl k Oc Oo Fl l Oc Oo Fl r Oc \
91 Oo Fl s Oc Oo Fl v Oc Oo Ar key Op Ar command Oc
92 Without options, list all bound keys, and the editor command to which
96 is supplied, show the bindings for
107 Bind all keys to the standard GNU Emacs-like bindings.
109 Bind all keys to the standard
113 List or change key bindings in the
115 mode alternate (command mode) key map.
118 is interpreted as a symbolic arrow key name, which may be one of
125 List all editor commands and a short description of each.
127 Remove a key's binding.
130 is taken as a literal string and treated as terminal input when
135 are themselves reinterpreted, and this continues for ten levels of
140 may be one of the commands documented in
141 .Sx "EDITOR COMMANDS"
142 below, or another key.
147 can contain control characters of the form
149 .Sq No ^ Ar character
155 and the following backslashed escape sequences:
157 .Bl -tag -compact -offset indent -width 4n
177 The ASCII character corresponding to the octal number
182 nullifies the special meaning of the following character,
183 if it has any, notably
187 .It Ic echotc Oo Fl sv Oc Ar arg Ar ...
188 Exercise terminal capabilities given in
199 the value of that capability is printed, with
203 indicating that the terminal does or does not have that capability.
206 returns an empty string for non-existent capabilities, rather than
209 causes messages to be verbose.
210 .It Ic edit Op Li on | Li off
211 Enable or disable the
213 functionality in a program.
214 .It Ic history Ar list | Ar size Dv n | Ar unique Dv n
217 command lists all entries in the history.
220 command sets the history size to
225 command controls if history should keep duplicate entries.
228 is non zero, only keep unique history entries.
231 is zero, then keep all entries (the default).
233 List the values of all the terminal capabilities (see
235 .It Ic settc Ar cap Ar val
236 Set the terminal capability
242 No sanity checking is done.
243 .It Ic setty Oo Fl a Oc Oo Fl d Oc Oo Fl q Oc Oo Fl x Oc Oo Ar +mode Oc \
244 Oo Ar -mode Oc Oo Ar mode Oc Oo Ar char=c Oc
245 Control which tty modes that
247 won't allow the user to change.
259 set of tty modes respectively; defaulting to
262 Without other arguments,
264 lists the modes in the chosen set which are fixed on
273 lists all tty modes in the chosen set regardless of the setting.
281 on or off or removes control of
286 can also be used to set tty characters to particular values using
291 then the character is set to
292 .Dv _POSIX_VDISABLE .
295 The following editor commands are available for use in key bindings:
296 .\" Section automatically generated with makelist
299 Vi paste previous deletion to the right of the cursor.
301 Vi paste previous deletion to the left of the cursor.
302 .It Ic vi-prev-space-word
303 Vi move to the previous space delimited word.
305 Vi move to the previous word.
306 .It Ic vi-next-space-word
307 Vi move to the next space delimited word.
309 Vi move to the next word.
310 .It Ic vi-change-case
311 Vi change case of character under the cursor and advance one character.
312 .It Ic vi-change-meta
313 Vi change prefix command.
314 .It Ic vi-insert-at-bol
315 Vi enter insert mode at the beginning of line.
316 .It Ic vi-replace-char
317 Vi replace character under the cursor with the next character typed.
318 .It Ic vi-replace-mode
319 Vi enter replace mode.
320 .It Ic vi-substitute-char
321 Vi replace character under the cursor and enter insert mode.
322 .It Ic vi-substitute-line
323 Vi substitute entire line.
324 .It Ic vi-change-to-eol
325 Vi change to end of line.
327 Vi enter insert mode.
329 Vi enter insert mode after the cursor.
331 Vi enter insert mode at end of line.
332 .It Ic vi-delete-meta
333 Vi delete prefix command.
335 Vi move to the end of the current space delimited word.
336 .It Ic vi-to-end-word
337 Vi move to the end of the current word.
340 .It Ic vi-command-mode
341 Vi enter command mode (use alternative key bindings).
343 Vi move to the beginning of line.
344 .It Ic vi-delete-prev-char
345 Vi move to previous character (backspace).
346 .It Ic vi-list-or-eof
347 Vi list choices for completion or indicate end of file if empty line.
348 .It Ic vi-kill-line-prev
349 Vi cut from beginning of line to cursor.
350 .It Ic vi-search-prev
351 Vi search history previous.
352 .It Ic vi-search-next
353 Vi search history next.
354 .It Ic vi-repeat-search-next
355 Vi repeat current search in the same search direction.
356 .It Ic vi-repeat-search-prev
357 Vi repeat current search in the opposite search direction.
359 Vi move to the character specified next.
361 Vi move to the character specified previous.
362 .It Ic vi-to-next-char
363 Vi move up to the character specified next.
364 .It Ic vi-to-prev-char
365 Vi move up to the character specified previous.
366 .It Ic vi-repeat-next-char
367 Vi repeat current character search in the same search direction.
368 .It Ic vi-repeat-prev-char
369 Vi repeat current character search in the opposite search direction.
370 .It Ic em-delete-or-list
371 Delete character under cursor or list completions if at end of line.
372 .It Ic em-delete-next-word
373 Cut from cursor to end of current word.
375 Paste cut buffer at cursor position.
377 Cut the entire line and save in cut buffer.
378 .It Ic em-kill-region
379 Cut area between mark and cursor and save in cut buffer.
380 .It Ic em-copy-region
381 Copy area between mark and cursor to cut buffer.
382 .It Ic em-gosmacs-transpose
383 Exchange the two characters before the cursor.
385 Move next to end of current word.
387 Uppercase the characters from cursor to end of current word.
388 .It Ic em-capitol-case
389 Capitalize the characters from cursor to end of current word.
391 Lowercase the characters from cursor to end of current word.
393 Set the mark at cursor.
394 .It Ic em-exchange-mark
395 Exchange the cursor and mark.
396 .It Ic em-universal-argument
397 Universal argument (argument times 4).
399 Add 8th bit to next character typed.
400 .It Ic em-toggle-overwrite
401 Switch from insert to overwrite mode or vice versa.
402 .It Ic em-copy-prev-word
403 Copy current word to cursor.
404 .It Ic em-inc-search-next
405 Emacs incremental next search.
406 .It Ic em-inc-search-prev
407 Emacs incremental reverse search.
408 .It Ic ed-end-of-file
409 Indicate end of file.
411 Add character to the line.
412 .It Ic ed-delete-prev-word
413 Delete from beginning of current word to cursor.
414 .It Ic ed-delete-next-char
415 Delete character under cursor.
417 Cut to the end of line.
418 .It Ic ed-move-to-end
419 Move cursor to the end of line.
420 .It Ic ed-move-to-beg
421 Move cursor to the beginning of line.
422 .It Ic ed-transpose-chars
423 Exchange the character to the left of the cursor with the one under it.
425 Move to the right one character.
427 Move to the beginning of the current word.
429 Move to the left one character.
430 .It Ic ed-quoted-insert
431 Add the next character typed verbatim.
433 Adds to argument or enters a digit.
434 .It Ic ed-argument-digit
435 Digit that starts argument.
437 Indicates unbound character.
439 Tty interrupt character.
441 Tty delayed suspend character.
442 .It Ic ed-tty-flush-output
443 Tty flush output characters.
444 .It Ic ed-tty-sigquit
446 .It Ic ed-tty-sigtstp
447 Tty suspend character.
448 .It Ic ed-tty-stop-output
449 Tty disallow output characters.
450 .It Ic ed-tty-start-output
451 Tty allow output characters.
454 .It Ic ed-delete-prev-char
455 Delete the character to the left of the cursor.
456 .It Ic ed-clear-screen
457 Clear screen leaving current line at the top.
459 Redisplay everything.
461 Erase current line and start from scratch.
462 .It Ic ed-sequence-lead-in
463 First character in a bound sequence.
464 .It Ic ed-prev-history
465 Move to the previous history line.
466 .It Ic ed-next-history
467 Move to the next history line.
468 .It Ic ed-search-prev-history
469 Search previous in history for a line matching the current.
470 .It Ic ed-search-next-history
471 Search next in history for a line matching the current.
477 Editline extended command.
479 .\" End of section automatically generated with makelist
487 library was written by Christos Zoulas,
488 and this manual was written by Luke Mewburn,
489 with some sections inspired by