EDITRC(5)
π EDITRC π
okay bestie, so this is the manual page for editrc, aka the configuration file for the editline library. and yeah, it's a file formats manual, so buckle up, it's giving β¨setupβ¨ energy.
π¦ SYNOPSIS π¦
editrc
πΈ DESCRIPTION πΈ
so editrc is literally the file where you define all the various settings that the editline(3) library is gonna use. it's your vibe-setting zone, no cap.
the format of each line is, and i quote:
[prog:]command [arg ...]
command is one of the editline(3) builtin commands. go peek at βBUILTIN COMMANDSβ below for the full tea, i promise it's worth it.
prog is the program name string that a program defines when it calls el_init(3) to set up editline(3), which is usually argv[0]. so command gets executed for any program that matches prog. matching energy only. π
prog may also be a regex(3) style regular expression, and in that case command will be executed for any program that matches the regular expression. regex girlies stay winning. π
and if prog is just... absent? then command is executed for all programs. everyone gets a piece. π
π BUILTIN COMMANDS π
the editline library has some builtin commands, and they affect the way that the line editing and history functions operate. these are based on similar named builtins present in the tcsh(1) shell. slay, we love a crossover.
the following builtin commands are available:
bind [-aeklrsv] [key [command]]β okay so with no options and no arguments, this lists all bound keys and macros, plus the editor command or input string to which each one is bound. if you only supplykey, it shows the binding for that key or macro. and if you supplykey command, it binds the editor command to that key or macro. it's giving matchmaker but for keys fr fr.
the options are as follows:
-aβ List or change key bindings in thevi(1)mode alternate (command mode) key map.-eβ Bind all keys to the standard GNU Emacs-like bindings.-kβkeyis interpreted as a symbolic arrow key name, which may be one ofup,down,leftorright. π§-lβ List all editor commands and a short description of each.-rβ Remove the binding of the key or macrokey. it's giving goodbye, not me deleting the binding π-sβ Define a keyboard macro rather than a key binding or command macro:commandis taken as a literal string and appended to the input queue wheneverkeyis typed. Bound keys and macros incommandare themselves reinterpreted, and this continues for ten levels of interpretation. ten! levels! recursion queen π-vβ Bind all keys to the standardvi(1)-like bindings.
the editline(7) manual documents all editor commands and contains more information about macros and the input queue. iykyk, go read it. π
key and command can contain control characters of the form β^characterβ (e.g. β^Aβ), and the following backslashed escape sequences:
\aβ Bell\bβ Backspace\eβ Escape\fβ Formfeed\nβ Newline\rβ Carriage return\tβ Horizontal tab\vβ Vertical tab\nnnβ The ASCII character corresponding to the octal numbernnn.
and β\β nullifies the special meaning of the following character, if it has any, notably β\β and β^β. so it's basically the "actually never mind, this one's normal" button. π«Ά
echotc [-sv] arg ...β Exercise terminal capabilities given inarg. ifargis β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. vibe check on your terminal, basically. π₯οΈβ¨
-s returns an empty string for non-existent capabilities, rather than causing an error. -v causes messages to be verbose.
edit [on | off]β Enable or disable theeditlinefunctionality in a program. the on/off switch, the main character toggle. π₯history list | size n | unique nβ the βlistβ command lists all entries in the history. the βsizeβ command sets the history size tonentries. the βuniqueβ command controls if history should keep duplicate entries. ifnis non zero, only keep unique history entries. ifnis zero, then keep all entries (the default). so zero = no filter, we're accepting everyone into the history πsettc cap valβ Set the terminal capabilitycaptoval, as defined intermcap(5).
no sanity checking is done. none. zero. it will simply do the thing you asked for and you will have to live with that π
setty [-a] [-d] [-q] [-x] [+mode] [-mode] [mode] [char=c]β Control which tty modes thateditrcwon't allow the user to change.-d,-qor-xtellssettyto 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β List the values of all the terminal capabilities (seetermcap(5)). the full rundown, the terminal lore dump. π
π ENVIRONMENT π
EDITRCβ Names the default configuration file for theeditline(3)library.
π FILES π
~/.editrcβ Last resort user configuration file for theeditline(3)library if no other file is specified. the final boss of config files. π
π SEE ALSO π
editline(3), regex(3), termcap(5), editline(7)
π AUTHORS π
The editline library was written by Christos Zoulas, and this manual was written by Luke Mewburn, with some sections inspired by tcsh(1). iconic collaborators honestly π«Ά
and that's the whole thing bestie! this page came from Debian, dated May 22, 2016, and it's page EDITRC(5) of the file formats manual. go forth and configure, you absolute legend π β¨
π¦ where this page comes from
- arch rolling: libedit 20260512_3.1-1 Β· BSD-3-Clause
- centos-stream 10: libedit 3.1-52.20230828cvs.el10 Β· BSD-3-Clause AND BSD-2-Clause AND ISC
- fedora 43: libedit 3.1-56.20250104cvs.fc43 Β· BSD-3-Clause AND BSD-2-Clause AND ISC
- fedora 43: libedit 3.1-56.20250104cvs.fc43 Β· BSD-3-Clause AND BSD-2-Clause AND ISC
- fedora 43: libedit 3.1-58.20260512cvs.fc43 Β· BSD-3-Clause AND BSD-2-Clause AND ISC
- fedora 43: libedit 3.1-58.20260512cvs.fc43 Β· BSD-3-Clause AND BSD-2-Clause AND ISC
- fedora 44: libedit 3.1-58.20251016cvs.fc44 Β· BSD-3-Clause AND BSD-2-Clause AND ISC
- fedora 44: libedit 3.1-58.20251016cvs.fc44 Β· BSD-3-Clause AND BSD-2-Clause AND ISC
- fedora 44: libedit 3.1-59.20260512cvs.fc44 Β· BSD-3-Clause AND BSD-2-Clause AND ISC
- fedora 44: libedit 3.1-59.20260512cvs.fc44 Β· BSD-3-Clause AND BSD-2-Clause AND ISC
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 1997-2000 The NetBSD Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms