1EDITRC(5)                   BSD File Formats Manual                  EDITRC(5)
2

NAME

4     editrc — configuration file for editline library
5

SYNOPSIS

7     editrc
8

DESCRIPTION

10     The editrc file defines various settings to be used by the editline(3)
11     library.
12
13     The format of each line is:
14
15           [prog:]command [arg ...]
16
17     command is one of the editline(3) builtin commands.  Refer to BUILTIN
18     COMMANDS for more information.
19
20     prog is the program name string that a program defines when it calls
21     el_init(3) to set up editline(3), which is usually argv[0].  command will
22     be executed for any program which matches prog.
23
24     prog may also be a regex(3) style regular expression, in which case
25     command will be executed for any program that matches the regular expres‐
26     sion.
27
28     If prog is absent, command is executed for all programs.
29

BUILTIN COMMANDS

31     The editline library has some builtin commands, which affect the way that
32     the line editing and history functions operate.  These are based on simi‐
33     lar named builtins present in the tcsh(1) shell.
34
35     The following builtin commands are available:
36
37     bind [-aeklrsv] [key [command]]
38           Without options and arguments, list all bound keys and macros, and
39           the editor command or input string to which each one is bound.  If
40           only key is supplied, show the binding for that key or macro.  If
41           key command is supplied, bind the editor command to that key or
42           macro.
43
44           The options are as follows:
45
46           -a    List or change key bindings in the vi(1) mode alternate (com‐
47                 mand mode) key map.
48
49           -e    Bind all keys to the standard GNU Emacs-like bindings.
50
51           -k    key is interpreted as a symbolic arrow key name, which may be
52                 one of up, down, left or right.
53
54           -l    List all editor commands and a short description of each.
55
56           -r    Remove the binding of the key or macro key.
57
58           -s    Define a keyboard macro rather than a key binding or command
59                 macro: command is taken as a literal string and appended to
60                 the input queue whenever key is typed.  Bound keys and macros
61                 in command are themselves reinterpreted, and this continues
62                 for ten levels of interpretation.
63
64           -v    Bind all keys to the standard vi(1)-like bindings.
65
66           The editline(7) manual documents all editor commands and contains
67           more information about macros and the input queue.
68
69           key and command can contain control characters of the form
70^character’ (e.g. ‘^A’), and the following backslashed escape se‐
71           quences:
72
73                 \a          Bell
74                 \b          Backspace
75                 \e          Escape
76                 \f          Formfeed
77                 \n          Newline
78                 \r          Carriage return
79                 \t          Horizontal tab
80                 \v          Vertical tab
81                 \nnn        The ASCII character corresponding to the octal
82                             number nnn.
83
84           ‘\’ nullifies the special meaning of the following character, if it
85           has any, notably ‘\’ and ‘^’.
86
87     echotc [-sv] arg ...
88           Exercise terminal capabilities given in arg.  If arg is ‘baud’,
89           ‘cols’, ‘lines’, ‘rows’, ‘meta’, or ‘tabs’, the value of that capa‐
90           bility is printed, with “yes” or “no” indicating that the terminal
91           does or does not have that capability.
92
93           -s returns an empty string for non-existent capabilities, rather
94           than causing an error.  -v causes messages to be verbose.
95
96     edit [on | off]
97           Enable or disable the editline functionality in a program.
98
99     history list | size n | unique n
100           The ‘list’ command lists all entries in the history.  The ‘size’
101           command sets the history size to n entries.  The ‘unique’ command
102           controls if history should keep duplicate entries.  If n is non
103           zero, only keep unique history entries.  If n is zero, then keep
104           all entries (the default).
105
106     settc cap val
107           Set the terminal capability cap to val, as defined in termcap(5).
108           No sanity checking is done.
109
110     setty [-a] [-d] [-q] [-x] [+mode] [-mode] [mode] [char=c]
111           Control which tty modes that editrc won't allow the user to change.
112           -d, -q or -x tells setty to act on the ‘edit’, ‘quote’ or ‘execute’
113           set of tty modes respectively; defaulting to -x.
114
115           Without other arguments, setty lists the modes in the chosen set
116           which are fixed on (+mode) or off (-mode).  -a lists all tty modes
117           in the chosen set regardless of the setting.  With +mode, -mode or
118           mode, fixes mode on or off or removes control of mode in the chosen
119           set.
120
121           Setty can also be used to set tty characters to particular values
122           using char=value.  If value is empty then the character is set to
123           _POSIX_VDISABLE.
124
125     telltc
126           List the values of all the terminal capabilities (see termcap(5)).
127

ENVIRONMENT

129     EDITRC           Names the default configuration file for the editline(3)
130                      library.
131

FILES

133     ~/.editrc                         Last resort user configuration file for
134                                       the editline(3) library if no other
135                                       file is specified.
136

SEE ALSO

138     editline(3), regex(3), termcap(5), editline(7)
139

AUTHORS

141     The editline library was written by Christos Zoulas, and this manual was
142     written by Luke Mewburn, with some sections inspired by tcsh(1).
143
144BSD                              May 22, 2016                              BSD
Impressum