1 .\" $NetBSD: editrc.5,v 1.33 2017/06/27 01:22:58 kre 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:
46 .Dl [prog:]command [arg ...]
57 is the program name string that a program defines when it calls
64 will be executed for any program which matches
71 regular expression, in which case
73 will be executed for any program that matches the regular expression.
79 is executed for all programs.
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
89 The following builtin commands are available:
91 .It Ic bind Oo Fl aeklrsv Oc Op Ar key Op Ar command
92 Without options and arguments, list all bound keys and macros, and
93 the editor command or input string to which each one is bound.
96 is supplied, show the binding for that key or macro.
99 is supplied, bind the editor
101 to that key or macro.
103 The options are as follows:
106 List or change key bindings in the
108 mode alternate (command mode) key map.
110 Bind all keys to the standard GNU Emacs-like bindings.
113 is interpreted as a symbolic arrow key name, which may be one of
120 List all editor commands and a short description of each.
122 Remove the binding of the key or macro
125 Define a keyboard macro rather than a key binding or command macro:
127 is taken as a literal string and appended to the input queue whenever
130 Bound keys and macros in
132 are themselves reinterpreted, and this continues for ten levels of
135 Bind all keys to the standard
142 manual documents all editor commands and contains more information
143 about macros and the input queue.
148 can contain control characters of the form
150 .Sq No ^ Ar character
156 and the following backslashed escape sequences:
158 .Bl -tag -compact -offset indent -width 4n
178 The ASCII character corresponding to the octal number
183 nullifies the special meaning of the following character,
184 if it has any, notably
188 .It Ic echotc Oo Fl sv Oc Ar arg Ar ...
189 Exercise terminal capabilities given in
201 the value of that capability is printed, with
205 indicating that the terminal does or does not have that capability.
208 returns an empty string for non-existent capabilities, rather than
211 causes messages to be verbose.
212 .It Ic edit Op Li on | Li off
213 Enable or disable the
215 functionality in a program.
216 .It Ic history Ar list | Ar size Dv n | Ar unique Dv n
219 command lists all entries in the history.
222 command sets the history size to
227 command controls if history should keep duplicate entries.
230 is non zero, only keep unique history entries.
233 is zero, then keep all entries (the default).
234 .It Ic settc Ar cap Ar val
235 Set the terminal capability
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.
258 set of tty modes respectively; defaulting to
261 Without other arguments,
263 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 .
293 List the values of all the terminal capabilities (see
297 .Bl -tag -width "~/.editrcXXX"
299 Names the default configuration file for the
304 .Bl -tag -width "~/.editrcXXX"
306 Last resort, if no other file is specified,
307 user configuration file for the
320 library was written by
321 .An Christos Zoulas ,
322 and this manual was written by
324 with some sections inspired by