EDITRC(5) File Formats Manual EDITRC(5)

# [NAME](#NAME)

**editrc** - configuration file for editline library

# [SYNOPSIS](#SYNOPSIS)

**editrc**

# [DESCRIPTION](#DESCRIPTION)

The **editrc** file defines various settings to be used by the [**editline**(3)](/man/os/libedit/editline.3) library.

The format of each line is:

\[prog:]command \[arg ...]

*command* is one of the [**editline**(3)](/man/os/libedit/editline.3) builtin commands. Refer to **BUILTIN COMMANDS** for more information.

*prog* is the program name string that a program defines when it calls [**el\_init**(3)](/man/os/libedit/el_init.3) to set up [**editline**(3)](/man/os/libedit/editline.3), which is usually *argv\[0]*. *command* will be executed for any program which matches *prog*.

*prog* may also be a [**regex**(3)](/man/os/libedit/regex.3) style regular expression, in which case *command* will be executed for any program that matches the regular expression.

If *prog* is absent, *command* is executed for all programs.

# [BUILTIN COMMANDS](#BUILTIN_COMMANDS)

The **editline** 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 [**tcsh**(1)](/man/os/libedit/tcsh.1) shell.

The following builtin commands are available:

[**bind Oo Fl aeklrsv Oc \[key \[command\]\]**](#bind)

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 *key* is supplied, show the binding for that key or macro. If *key* command is supplied, bind the editor *command* to that key or macro.

The options are as follows:

**-a**

List or change key bindings in the [**vi**(1)](/man/os/libedit/vi.1) mode alternate (command mode) key map.

**-e**

Bind all keys to the standard GNU Emacs-like bindings.

[**-k**](#k)

*key* is interpreted as a symbolic arrow key name, which may be one of \`up', \`down', \`left' or \`right'.

[**-l**](#l)

List all editor commands and a short description of each.

**-r**

Remove the binding of the key or macro *key*.

[**-s**](#s)

Define a keyboard macro rather than a key binding or command macro: *command* is taken as a literal string and appended to the input queue whenever *key* is typed. Bound keys and macros in *command* are themselves reinterpreted, and this continues for ten levels of interpretation.

**-v**

Bind all keys to the standard [**vi**(1)](/man/os/libedit/vi.1) -like bindings.

The [**editline**(7)](/man/os/libedit/editline.7) manual documents all editor commands and contains more information about macros and the input queue.

*key* and *command* can contain control characters of the form \`No'^*character* ( e.g. \`^A' ), and the following backslashed escape sequences:

[\\a](#a)

Bell

[\\b](#b)

Backspace

[\\e](#e)

Escape

[\\f](#f)

Formfeed

[\\n](#n)

Newline

[\\r](#r)

Carriage return

[\\t](#t)

Horizontal tab

[\\v](#v)

Vertical tab

[**\\ Ar nnn**](#Ar)

The ASCII character corresponding to the octal number *nnn*.

\`\\' nullifies the special meaning of the following character, if it has any, notably \`\\' and \`^'.

[**echotc Oo Fl sv Oc arg ...**](#echotc)

Exercise terminal capabilities given in *arg*... . If *arg* 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.

**-s** returns an empty string for non-existent capabilities, rather than causing an error. **-v** causes messages to be verbose.

[**edit \[Li on | Li off\]**](#edit)

Enable or disable the **editline** functionality in a program.

[**history list | size Dv n | unique Dv n**](#history)

The *list* command lists all entries in the history. The *size* command sets the history size to n entries. The *unique* 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).

[**settc cap val**](#settc)

Set the terminal capability *cap* to *val*, as defined in [**termcap**(5)](/man/os/libedit/termcap.5). No sanity checking is done.

[**setty Oo Fl a Oc Oo Fl d Oc Oo Fl q Oc Oo Fl x Oc Oo +mode OcOo Ar -mode Oc Oo Ar mode Oc Oo Ar char=c Oc**](#setty)

Control which tty modes that **editrc** won't allow the user to change. **-d**, **-q** or **-x** tells **setty** to act on the \`edit', \`quote' or \`execute' set of tty modes respectively; defaulting to **-x**.

Without other arguments, **setty** lists the modes in the chosen set which are fixed on ( \`+mode' ) or off ( \`-mode' ). **-a** lists all tty modes in the chosen set regardless of the setting. With *+mode*, *-mode* or *mode*, fixes *mode* on or off or removes control of *mode* in the chosen set.

**Setty** can also be used to set tty characters to particular values using *char=value*. If *value* is empty then the character is set to \_POSIX\_VDISABLE .

[**telltc**](#telltc)

List the values of all the terminal capabilities (see [**termcap**(5)](/man/os/libedit/termcap.5)) .

# [ENVIRONMENT](#ENVIRONMENT)

[**EDITRC**](#EDITRC)

Names the default configuration file for the [**editline**(3)](/man/os/libedit/editline.3) library.

# [FILES](#FILES)

**~/.editrc**

Last resort, if no other file is specified, user configuration file for the [**editline**(3)](/man/os/libedit/editline.3) library.

# [SEE ALSO](#SEE_ALSO)

[**editline**(3)](/man/os/libedit/editline.3), [**regex**(3)](/man/os/libedit/regex.3), [**termcap**(5)](/man/os/libedit/termcap.5), [**editline**(7)](/man/os/libedit/editline.7)

# [AUTHORS](#AUTHORS)

-nosplit The **editline** library was written by

Christos Zoulas , and this manual was written by

Luke Mewburn , with some sections inspired by [**tcsh**(1)](/man/os/libedit/tcsh.1).

May 22, 2016

---

Document: editrc(5) from libedit 3.1-r20 (Chainguard OS)
Source: https://www.thrysoee.dk/editline/libedit-20210910-3.1.tar.gz
