# EDITRC - configuration file for editline library - man(5edit) - [phpMan]

[_EDITRC_(5edit)](https://www.chedong.com/phpMan.php/man/EDITRC/5edit/markdown)                                   LOCAL                                  [_EDITRC_(5edit)](https://www.chedong.com/phpMan.php/man/EDITRC/5edit/markdown)

## NAME
       editrc — configuration file for editline library

## SYNOPSIS
### editrc

## DESCRIPTION
       The **editrc **file defines various settings to be used by the [_editline_(3edit)](https://www.chedong.com/phpMan.php/man/editline/3edit/markdown) library.

       The format of each line is:

             [_prog_**:**]_command_ [_arg_ _..._]

       _command_ is one of the [_editline_(3edit)](https://www.chedong.com/phpMan.php/man/editline/3edit/markdown) 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)](https://www.chedong.com/phpMan.php/man/elinit/3/markdown) to set up
       [_editline_(3edit)](https://www.chedong.com/phpMan.php/man/editline/3edit/markdown), which is usually _argv_**[0]**.  _command_ will be executed for  any  program  which
       matches _prog_.

       _prog_  may also be a [_regex_(3)](https://www.chedong.com/phpMan.php/man/regex/3/markdown) 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
       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)](https://www.chedong.com/phpMan.php/man/tcsh/1/markdown) shell.

       The following builtin commands are available:

       **bind **[**-aeklrsv**] [_key_ [_command_]]
             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)](https://www.chedong.com/phpMan.php/man/vi/1/markdown) mode alternate (command mode) key map.

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

             **-k    _**key_ is interpreted as a symbolic arrow key name, which may be one  of  **up**,  **down**,
                   **left **or **right**.

             **-l    **List all editor commands and a short description of each.

             **-r    **Remove the binding of the key or macro _key_.

             **-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)](https://www.chedong.com/phpMan.php/man/vi/1/markdown)-like bindings.

             The  [_editline_(7edit)](https://www.chedong.com/phpMan.php/man/editline/7edit/markdown) 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  ‘**^_**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 number _nnn_.

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

       **echotc **[**-sv**] _arg_ _..._
             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 **[**on **| **off**]
             Enable or disable the **editline **functionality in a program.

       **history list **| **size _**n_ | **unique _**n_
             The ‘list’ command lists all entries in the history.  The ‘size’ command sets the  his‐
             tory 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_
             Set the terminal capability _cap_ to _val_, as defined in [_termcap_(5)](https://www.chedong.com/phpMan.php/man/termcap/5/markdown).  No  sanity  checking
             is done.

       **setty **[**-a**] [**-d**] [**-q**] [**-x**] [**+_**mode_] [**-_**mode_] [_mode_] [_char_**=_**c_]
             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; de‐
             faulting 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 (see [_termcap_(5)](https://www.chedong.com/phpMan.php/man/termcap/5/markdown)).

## ENVIRONMENT
       EDITRC           Names the default configuration file for the [_editline_(3edit)](https://www.chedong.com/phpMan.php/man/editline/3edit/markdown) library.

## FILES
       _~/.editrc_                         Last resort user configuration file for the [_editline_(3edit)](https://www.chedong.com/phpMan.php/man/editline/3edit/markdown)
                                         library if no other file is specified.

## SEE ALSO
       [_editline_(3edit)](https://www.chedong.com/phpMan.php/man/editline/3edit/markdown), [_regex_(3)](https://www.chedong.com/phpMan.php/man/regex/3/markdown), [_termcap_(5)](https://www.chedong.com/phpMan.php/man/termcap/5/markdown), [_editline_(7edit)](https://www.chedong.com/phpMan.php/man/editline/7edit/markdown)

## AUTHORS
       The **editline **library was written by Christos Zoulas, and this  manual  was  written  by  Luke
       Mewburn, with some sections inspired by [_tcsh_(1)](https://www.chedong.com/phpMan.php/man/tcsh/1/markdown).

Debian                                      May 22, 2016                               [_EDITRC_(5edit)](https://www.chedong.com/phpMan.php/man/EDITRC/5edit/markdown)
