Spaces:
Running
Running
File size: 5,472 Bytes
1d777c4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 |
.TH EDITRC 5 "May 22, 2016" ""
.SH NAME
\fBeditrc\fP
\- configuration file for editline library
.SH SYNOPSIS
.br
\fBeditrc\fP
.SH DESCRIPTION
The
\fBeditrc\fP
file defines various settings to be used by the
\fBeditline\fP(3)
library.
The format of each line is:
[prog:]command [arg ...]
\fIcommand\fP
is one of the
\fBeditline\fP(3)
builtin commands.
Refer to
.B BUILTIN COMMANDS
for more information.
\fIprog\fP
is the program name string that a program defines when it calls
\fBel_init\fP(3)
to set up
\fBeditline\fP(3),
which is usually
\fIargv[0]\fP.
\fIcommand\fP
will be executed for any program which matches
\fIprog\fP.
\fIprog\fP
may also be a
\fBregex\fP(3)
style
regular expression, in which case
\fIcommand\fP
will be executed for any program that matches the regular expression.
If
\fIprog\fP
is absent,
\fIcommand\fP
is executed for all programs.
.SH BUILTIN COMMANDS
The
\fBeditline\fP
library has some builtin commands, which affect the way
that the line editing and history functions operate.
These are based on similar named builtins present in the
\fBtcsh\fP(1)
shell.
The following builtin commands are available:
.TP
\fBbind Oo Fl aeklrsv Oc [\fIkey\fP [\fIcommand]]\fP\fP
Without options and arguments, list all bound keys and macros, and
the editor command or input string to which each one is bound.
If only
\fIkey\fP
is supplied, show the binding for that key or macro.
If
\fIkey\fP command
is supplied, bind the editor
\fIcommand\fP
to that key or macro.
The options are as follows:
.RS
.TP
\fB\-a\fP
List or change key bindings in the
\fBvi\fP(1)
mode alternate (command mode) key map.
.TP
\fB\-e\fP
Bind all keys to the standard GNU Emacs-like bindings.
.TP
\fB\-k\fP
\fIkey\fP
is interpreted as a symbolic arrow key name, which may be one of
`up',
`down',
`left'
or
`right'.
.TP
\fB\-l\fP
List all editor commands and a short description of each.
.TP
\fB\-r\fP
Remove the binding of the key or macro
\fIkey\fP.
.TP
\fB\-s\fP
Define a keyboard macro rather than a key binding or command macro:
\fIcommand\fP
is taken as a literal string and appended to the input queue whenever
\fIkey\fP
is typed.
Bound keys and macros in
\fIcommand\fP
are themselves reinterpreted, and this continues for ten levels of
interpretation.
.TP
\fB\-v\fP
Bind all keys to the standard
\fBvi\fP(1) -like
bindings.
.RE
The
\fBeditline\fP(7)
manual documents all editor commands and contains more information
about macros and the input queue.
\fIkey\fP
and
\fIcommand\fP
can contain control characters of the form
`No'^\fIcharacter\fP
(
e.g.\&
`^A'
),
and the following backslashed escape sequences:
.RS
.TP
\fB\ea\fP
Bell
.TP
\fB\eb\fP
Backspace
.TP
\fB\ee\fP
Escape
.TP
\fB\ef\fP
Formfeed
.TP
\fB\en\fP
Newline
.TP
\fB\er\fP
Carriage return
.TP
\fB\et\fP
Horizontal tab
.TP
\fB\ev\fP
Vertical tab
.TP
.B \e Ar nnn
The ASCII character corresponding to the octal number
\fInnn\fP.
.RE
`\e'
nullifies the special meaning of the following character,
if it has any, notably
`\e'
and
`^'.
.TP
\fBechotc Oo Fl sv Oc \fIarg\fP \fI...\fP\fP
Exercise terminal capabilities given in
\fIarg\fP... .
If
\fIarg\fP
is
`baud',
`cols',
`lines',
`rows',
`meta',
or
`tabs',
the value of that capability is printed, with
``yes''
or
``no''
indicating that the terminal does or does not have that capability.
\fB\-s\fP
returns an empty string for non-existent capabilities, rather than
causing an error.
\fB\-v\fP
causes messages to be verbose.
.TP
\fBedit [Li on | Li off]\fP
Enable or disable the
\fBeditline\fP
functionality in a program.
.TP
\fBhistory \fIlist\fP | \fIsize\fP Dv n | \fIunique\fP Dv n\fP
The
\fIlist\fP
command lists all entries in the history.
The
\fIsize\fP
command sets the history size to
n
entries.
The
\fIunique\fP
command controls if history should keep duplicate entries.
If
n
is non zero, only keep unique history entries.
If
n
is zero, then keep all entries (the default).
.TP
\fBsettc \fIcap\fP \fIval\fP\fP
Set the terminal capability
\fIcap\fP
to
\fIval\fP,
as defined in
\fBtermcap\fP(5).
No sanity checking is done.
.TP
\fBsetty Oo Fl a Oc Oo Fl d Oc Oo Fl q Oc Oo Fl x Oc Oo \fI+mode\fP Oc \\fP
Oo Ar -mode Oc Oo Ar mode Oc Oo Ar char=c Oc
Control which tty modes that
\fBeditrc\fP
won't allow the user to change.
\fB\-d\fP,
\fB\-q\fP
or
\fB\-x\fP
tells
\fBsetty\fP
to act on the
`edit',
`quote'
or
`execute'
set of tty modes respectively; defaulting to
\fB\-x\fP.
Without other arguments,
\fBsetty\fP
lists the modes in the chosen set which are fixed on
(
`+mode'
)
or off
(
`-mode'
).
\fB\-a\fP
lists all tty modes in the chosen set regardless of the setting.
With
\fI+mode\fP,
\fI-mode\fP
or
\fImode\fP,
fixes
\fImode\fP
on or off or removes control of
\fImode\fP
in the chosen set.
\fBSetty\fP
can also be used to set tty characters to particular values using
\fIchar=value\fP.
If
\fIvalue\fP
is empty
then the character is set to
_POSIX_VDISABLE .
.TP
\fBtelltc\fP
List the values of all the terminal capabilities (see
\fBtermcap\fP(5)) .
.SH ENVIRONMENT
.TP
.B EDITRC
Names the default configuration file for the
\fBeditline\fP(3)
library.
.SH FILES
.TP
.B ~/.editrc
Last resort, if no other file is specified,
user configuration file for the
\fBeditline\fP(3)
library.
.SH SEE ALSO
\fBeditline\fP(3),
\fBregex\fP(3),
\fBtermcap\fP(5),
\fBeditline\fP(7)
.SH AUTHORS
-nosplit
The
\fBeditline\fP
library was written by
Christos Zoulas ,
and this manual was written by
Luke Mewburn ,
with some sections inspired by
\fBtcsh\fP(1).
|