{
    "mode": "man",
    "parameter": "editrc",
    "section": "5edit",
    "url": "https://www.chedong.com/phpMan.php/man/editrc/5edit/json",
    "generated": "2026-06-02T17:57:24Z",
    "synopsis": "",
    "sections": {
        "NAME": {
            "content": "editrc — configuration file for editline library\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "",
            "subsections": [
                {
                    "name": "editrc",
                    "content": ""
                }
            ]
        },
        "DESCRIPTION": {
            "content": "The editrc file defines various settings to be used by the editline(3edit) library.\n\nThe format of each line is:\n\n[prog:]command [arg ...]\n\ncommand is one of the editline(3edit) builtin commands.  Refer to BUILTIN COMMANDS for more in‐\nformation.\n\nprog is the program name string that a program defines when it calls elinit(3) to set up\neditline(3edit), which is usually argv[0].  command will be executed for any program which\nmatches prog.\n\nprog may also be a regex(3) style regular expression, in which case command will be executed\nfor any program that matches the regular expression.\n\nIf prog is absent, command is executed for all programs.\n",
            "subsections": []
        },
        "BUILTIN COMMANDS": {
            "content": "The editline library has some builtin commands, which affect the way that the line editing and\nhistory functions operate.  These are based on similar named builtins present in the tcsh(1)\nshell.\n\nThe following builtin commands are available:\n\nbind [-aeklrsv] [key [command]]\nWithout options and arguments, list all bound keys and macros, and the editor command or\ninput string to which each one is bound.  If only key is supplied, show the binding for\nthat key or macro.  If key command is supplied, bind the editor command to that key or\nmacro.\n\nThe options are as follows:\n\n-a    List or change key bindings in the vi(1) mode alternate (command mode) key map.\n\n-e    Bind all keys to the standard GNU Emacs-like bindings.\n\n-k    key is interpreted as a symbolic arrow key name, which may be one of ‘up’, ‘down’,\n‘left’ or ‘right’.\n\n-l    List all editor commands and a short description of each.\n\n-r    Remove the binding of the key or macro key.\n\n-s    Define a keyboard macro rather than a key binding or command macro: command is\ntaken as a literal string and appended to the input queue whenever key is typed.\nBound keys and macros in command are themselves reinterpreted, and this continues\nfor ten levels of interpretation.\n\n-v    Bind all keys to the standard vi(1)-like bindings.\n\nThe editline(7edit) manual documents all editor commands and contains more information\nabout macros and the input queue.\n\nkey and command can contain control characters of the form ‘^character’ (e.g. ‘^A’), and\nthe following backslashed escape sequences:\n\n\\a    Bell\n\\b    Backspace\n\\e    Escape\n\\f    Formfeed\n\\n    Newline\n\\r    Carriage return\n\\t    Horizontal tab\n\\v    Vertical tab\n\\nnn  The ASCII character corresponding to the octal number nnn.\n\n‘\\’ nullifies the special meaning of the following character, if it has any, notably ‘\\’\nand ‘^’.\n\nechotc [-sv] arg ...\nExercise terminal capabilities given in arg ....  If arg is ‘baud’, ‘cols’, ‘lines’,\n‘rows’, ‘meta’, or ‘tabs’, the value of that capability is printed, with “yes” or “no”\nindicating that the terminal does or does not have that capability.\n\n-s returns an empty string for non-existent capabilities, rather than causing an error.\n-v causes messages to be verbose.\n\nedit [on | off]\nEnable or disable the editline functionality in a program.\n\nhistory list | size n | unique n\nThe list command lists all entries in the history.  The size command sets the history\nsize to n entries.  The unique command controls if history should keep duplicate entries.\nIf n is non zero, only keep unique history entries.  If n is zero, then keep all entries\n(the default).\n\nsettc cap val\nSet the terminal capability cap to val, as defined in termcap(5).  No sanity checking is\ndone.\n\nsetty [-a] [-d] [-q] [-x] [+mode] [-mode] [mode] [char=c]\nControl which tty modes that editrc won't allow the user to change.  -d, -q or -x tells\nsetty to act on the ‘edit’, ‘quote’ or ‘execute’ set of tty modes respectively; default‐\ning to -x.\n\nWithout other arguments, setty lists the modes in the chosen set which are fixed on\n(‘+mode’) or off (‘-mode’).  -a lists all tty modes in the chosen set regardless of the\nsetting.  With +mode, -mode or mode, fixes mode on or off or removes control of mode in\nthe chosen set.\n\nSetty can also be used to set tty characters to particular values using char=value.  If\nvalue is empty then the character is set to POSIXVDISABLE.\n",
            "subsections": [
                {
                    "name": "telltc",
                    "content": "List the values of all the terminal capabilities (see termcap(5)).\n"
                }
            ]
        },
        "ENVIRONMENT": {
            "content": "EDITRC        Names the default configuration file for the editline(3edit) library.\n",
            "subsections": []
        },
        "FILES": {
            "content": "~/.editrc     Last resort, if no other file is specified, user configuration file for the\neditline(3edit) library.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "editline(3edit), regex(3), termcap(5), editline(7edit)\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "The editline library was written by Christos Zoulas, and this manual was written by Luke\nMewburn, with some sections inspired by tcsh(1).\n\nBSD                              May 22, 2016                              BSD",
            "subsections": []
        }
    },
    "summary": "editrc — configuration file for editline library",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "editline",
            "section": "3edit",
            "url": "https://www.chedong.com/phpMan.php/man/editline/3edit/json"
        },
        {
            "name": "regex",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/regex/3/json"
        },
        {
            "name": "termcap",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/termcap/5/json"
        },
        {
            "name": "editline",
            "section": "7edit",
            "url": "https://www.chedong.com/phpMan.php/man/editline/7edit/json"
        }
    ]
}