1 .\" $OpenBSD: editrc.5,v 1.32 2016/05/22 22:08:42 schwarze Exp $
2 .\" $NetBSD: editrc.5,v 1.31 2016/04/28 15:50:34 christos Exp $
4 .\" Copyright (c) 1997-2000 The NetBSD Foundation, Inc.
5 .\" All rights reserved.
7 .\" This file was contributed to The NetBSD Foundation by Luke Mewburn.
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
18 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 .\" POSSIBILITY OF SUCH DAMAGE.
30 .Dd $Mdocdate: May 22 2016 $
35 .Nd configuration file for editline library
39 file defines various settings to be used by the
43 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 tcsh shell.
86 The following builtin commands are available:
88 .It Ic bind Oo Fl aeklrsv Oc Op Ar key Op Ar command
89 Without options and arguments, list all bound keys and macros, and
90 the editor command or input string to which each one is bound.
93 is supplied, show the binding for that key or macro.
96 is supplied, bind the editor
100 The options are as follows:
103 List or change key bindings in the
105 mode alternate (command mode) key map.
107 Bind all keys to the standard GNU Emacs-like bindings.
110 is interpreted as a symbolic arrow key name, which may be one of
117 List all editor commands and a short description of each.
119 Remove the binding of the key or macro
122 Define a keyboard macro rather than a key binding or command macro:
124 is taken as a literal string and appended to the input queue whenever
127 Bound keys and macros in
129 are themselves reinterpreted, and this continues for ten levels of
132 Bind all keys to the standard
139 manual documents all editor commands and contains more information
140 about macros and the input queue.
145 can contain control characters of the form
147 .Sq No ^ Ar character
153 and the following backslashed escape sequences:
155 .Bl -tag -compact -offset indent -width 4n
175 The ASCII character corresponding to the octal number
180 nullifies the special meaning of the following character,
181 if it has any, notably
185 .It Ic echotc Oo Fl sv Oc Ar arg Ar ...
186 Exercise terminal capabilities given in
198 the value of that capability is printed, with
202 indicating that the terminal does or does not have that capability.
205 returns an empty string for non-existent capabilities, rather than
208 causes messages to be verbose.
209 .It Ic edit Op Li on | Li off
210 Enable or disable the
212 functionality in a program.
213 .It Ic history Ar list | Ar size Dv n | Ar unique Dv n
216 command lists all entries in the history.
219 command sets the history size to
224 command controls if history should keep duplicate entries.
227 is non zero, only keep unique history entries.
230 is zero, then keep all entries (the default).
231 .It Ic settc Ar cap Ar val
232 Set the terminal capability
238 No sanity checking is done.
246 Control which tty modes that
248 won't allow the user to change.
260 set of tty modes respectively; defaulting to
263 Without other arguments,
265 lists the modes in the chosen set which are fixed on
274 lists all tty modes in the chosen set regardless of the setting.
282 on or off or removes control of
287 can also be used to set tty characters to particular values using
292 then the character is set to
293 .Dv _POSIX_VDISABLE .
295 List the values of all the terminal capabilities (see
299 .Bl -tag -width "~/.editrcXXX"
301 User configuration file for the
314 library was written by
315 .An Christos Zoulas ,
316 and this manual was written by
318 with some sections inspired by tcsh.