Annotation of embedaddon/readline/doc/readline.0, revision 1.1.1.1

1.1       misho       1: READLINE(3)                                                        READLINE(3)
                      2: 
                      3: 
                      4: 
                      5: NNAAMMEE
                      6:        readline - get a line from a user with editing
                      7: 
                      8: SSYYNNOOPPSSIISS
                      9:        ##iinncclluuddee <<ssttddiioo..hh>>
                     10:        ##iinncclluuddee <<rreeaaddlliinnee//rreeaaddlliinnee..hh>>
                     11:        ##iinncclluuddee <<rreeaaddlliinnee//hhiissttoorryy..hh>>
                     12: 
                     13:        _c_h_a_r _*
                     14:        rreeaaddlliinnee (_c_o_n_s_t _c_h_a_r _*_p_r_o_m_p_t);
                     15: 
                     16: CCOOPPYYRRIIGGHHTT
                     17:        Readline is Copyright (C) 1989-2011 Free Software Foundation,  Inc.
                     18: 
                     19: DDEESSCCRRIIPPTTIIOONN
                     20:        rreeaaddlliinnee will read a line from the terminal and return it, using pprroommpptt
                     21:        as a prompt.  If pprroommpptt is NNUULLLL or  the  empty  string,  no  prompt  is
                     22:        issued.  The line returned is allocated with _m_a_l_l_o_c(3); the caller must
                     23:        free it when  finished.   The  line  returned  has  the  final  newline
                     24:        removed, so only the text of the line remains.
                     25: 
                     26:        rreeaaddlliinnee  offers  editing  capabilities  while the user is entering the
                     27:        line.  By default, the line editing commands are similar  to  those  of
                     28:        emacs.  A vi-style line editing interface is also available.
                     29: 
                     30:        This  manual  page describes only the most basic use of rreeaaddlliinnee.  Much
                     31:        more functionality is available; see _T_h_e _G_N_U _R_e_a_d_l_i_n_e _L_i_b_r_a_r_y  and  _T_h_e
                     32:        _G_N_U _H_i_s_t_o_r_y _L_i_b_r_a_r_y for additional information.
                     33: 
                     34: RREETTUURRNN VVAALLUUEE
                     35:        rreeaaddlliinnee  returns  the text of the line read.  A blank line returns the
                     36:        empty string.  If EEOOFF is encountered while reading a line, and the line
                     37:        is  empty,  NNUULLLL is returned.  If an EEOOFF is read with a non-empty line,
                     38:        it is treated as a newline.
                     39: 
                     40: NNOOTTAATTIIOONN
                     41:        An Emacs-style notation is used to denote keystrokes.  Control keys are
                     42:        denoted  by C-_k_e_y, e.g., C-n means Control-N.  Similarly, _m_e_t_a keys are
                     43:        denoted by M-_k_e_y, so M-x means Meta-X.  (On keyboards  without  a  _m_e_t_a
                     44:        key,  M-_x means ESC _x, i.e., press the Escape key then the _x key.  This
                     45:        makes ESC the _m_e_t_a _p_r_e_f_i_x.  The combination M-C-_x means  ESC-Control-_x,
                     46:        or  press the Escape key then hold the Control key while pressing the _x
                     47:        key.)
                     48: 
                     49:        Readline commands may be given numeric _a_r_g_u_m_e_n_t_s, which normally act as
                     50:        a  repeat  count.   Sometimes,  however, it is the sign of the argument
                     51:        that is significant.  Passing a negative argument  to  a  command  that
                     52:        acts  in the forward direction (e.g., kkiillll--lliinnee) causes that command to
                     53:        act in a backward direction.  Commands whose  behavior  with  arguments
                     54:        deviates from this are noted.
                     55: 
                     56:        When  a command is described as _k_i_l_l_i_n_g text, the text deleted is saved
                     57:        for possible future retrieval (_y_a_n_k_i_n_g).  The killed text is saved in a
                     58:        _k_i_l_l _r_i_n_g.  Consecutive kills cause the text to be accumulated into one
                     59:        unit, which can be yanked all at once.  Commands which do not kill text
                     60:        separate the chunks of text on the kill ring.
                     61: 
                     62: IINNIITTIIAALLIIZZAATTIIOONN FFIILLEE
                     63:        Readline  is  customized  by putting commands in an initialization file
                     64:        (the _i_n_p_u_t_r_c file).  The name of this file is taken from the  value  of
                     65:        the  IINNPPUUTTRRCC  environment  variable.   If  that  variable is unset, the
                     66:        default is _~_/_._i_n_p_u_t_r_c.  If that file  does not exist or cannot be read,
                     67:        the  ultimate  default  is _/_e_t_c_/_i_n_p_u_t_r_c.  When a program which uses the
                     68:        readline library starts up, the init file is read, and the key bindings
                     69:        and  variables  are set.  There are only a few basic constructs allowed
                     70:        in the readline init file.  Blank lines are ignored.   Lines  beginning
                     71:        with  a  ## are comments.  Lines beginning with a $$ indicate conditional
                     72:        constructs.  Other lines denote key  bindings  and  variable  settings.
                     73:        Each  program using this library may add its own commands and bindings.
                     74: 
                     75:        For example, placing
                     76: 
                     77:               M-Control-u: universal-argument
                     78:        or
                     79:               C-Meta-u: universal-argument
                     80: 
                     81:        into the _i_n_p_u_t_r_c would make M-C-u execute the readline command  _u_n_i_v_e_r_-
                     82:        _s_a_l_-_a_r_g_u_m_e_n_t.
                     83: 
                     84:        The  following symbolic character names are recognized while processing
                     85:        key bindings: _D_E_L, _E_S_C, _E_S_C_A_P_E,  _L_F_D,  _N_E_W_L_I_N_E,  _R_E_T,  _R_E_T_U_R_N,  _R_U_B_O_U_T,
                     86:        _S_P_A_C_E, _S_P_C, and _T_A_B.
                     87: 
                     88:        In  addition  to  command  names, readline allows keys to be bound to a
                     89:        string that is inserted when the key is pressed (a _m_a_c_r_o).
                     90: 
                     91: 
                     92:    KKeeyy BBiinnddiinnggss
                     93:        The syntax for controlling key bindings in the _i_n_p_u_t_r_c file is  simple.
                     94:        All  that is required is the name of the command or the text of a macro
                     95:        and a key sequence to which it should be bound. The name may be  speci-
                     96:        fied in one of two ways: as a symbolic key name, possibly with _M_e_t_a_- or
                     97:        _C_o_n_t_r_o_l_- prefixes, or as a key sequence.  The name and key sequence are
                     98:        separated  by a colon.  There can be no whitespace between the name and
                     99:        the colon.
                    100: 
                    101:        When using the form kkeeyynnaammee:_f_u_n_c_t_i_o_n_-_n_a_m_e or _m_a_c_r_o, _k_e_y_n_a_m_e is the name
                    102:        of a key spelled out in English.  For example:
                    103: 
                    104:               Control-u: universal-argument
                    105:               Meta-Rubout: backward-kill-word
                    106:               Control-o: "> output"
                    107: 
                    108:        In  the above example, _C_-_u is bound to the function uunniivveerrssaall--aarrgguummeenntt,
                    109:        _M_-_D_E_L is bound to the function bbaacckkwwaarrdd--kkiillll--wwoorrdd, and _C_-_o is bound  to
                    110:        run  the macro expressed on the right hand side (that is, to insert the
                    111:        text ``> output'' into the line).
                    112: 
                    113:        In the second form, ""kkeeyysseeqq"":_f_u_n_c_t_i_o_n_-_n_a_m_e  or  _m_a_c_r_o,  kkeeyysseeqq  differs
                    114:        from  kkeeyynnaammee above in that strings denoting an entire key sequence may
                    115:        be specified by placing the sequence within double  quotes.   Some  GNU
                    116:        Emacs  style  key escapes can be used, as in the following example, but
                    117:        the symbolic character names are not recognized.
                    118: 
                    119:               "\C-u": universal-argument
                    120:               "\C-x\C-r": re-read-init-file
                    121:               "\e[11~": "Function Key 1"
                    122: 
                    123:        In this example, _C_-_u is again bound to the function uunniivveerrssaall--aarrgguummeenntt.
                    124:        _C_-_x  _C_-_r is bound to the function rree--rreeaadd--iinniitt--ffiillee, and _E_S_C _[ _1 _1 _~ is
                    125:        bound to insert the text ``Function Key 1''.
                    126: 
                    127:        The full set of GNU Emacs style escape sequences available when  speci-
                    128:        fying key sequences is
                    129:               \\CC--    control prefix
                    130:               \\MM--    meta prefix
                    131:               \\ee     an escape character
                    132:               \\\\     backslash
                    133:               \\""     literal ", a double quote
                    134:               \\''     literal ', a single quote
                    135: 
                    136:        In  addition  to  the GNU Emacs style escape sequences, a second set of
                    137:        backslash escapes is available:
                    138:               \\aa     alert (bell)
                    139:               \\bb     backspace
                    140:               \\dd     delete
                    141:               \\ff     form feed
                    142:               \\nn     newline
                    143:               \\rr     carriage return
                    144:               \\tt     horizontal tab
                    145:               \\vv     vertical tab
                    146:               \\_n_n_n   the eight-bit character whose value is  the  octal  value
                    147:                      _n_n_n (one to three digits)
                    148:               \\xx_H_H   the  eight-bit  character  whose value is the hexadecimal
                    149:                      value _H_H (one or two hex digits)
                    150: 
                    151:        When entering the text of a macro, single or double  quotes  should  be
                    152:        used  to indicate a macro definition.  Unquoted text is assumed to be a
                    153:        function name.  In the macro  body,  the  backslash  escapes  described
                    154:        above  are  expanded.   Backslash will quote any other character in the
                    155:        macro text, including " and '.
                    156: 
                    157:        BBaasshh allows the current readline key bindings to be displayed or  modi-
                    158:        fied  with  the bbiinndd builtin command.  The editing mode may be switched
                    159:        during interactive use by using the --oo option to the sseett  builtin  com-
                    160:        mand.   Other  programs  using this library provide similar mechanisms.
                    161:        The _i_n_p_u_t_r_c file may be edited and re-read if a program does  not  pro-
                    162:        vide any other means to incorporate new bindings.
                    163: 
                    164:    VVaarriiaabblleess
                    165:        Readline has variables that can be used to further customize its behav-
                    166:        ior.  A variable may be set in the _i_n_p_u_t_r_c file with a statement of the
                    167:        form
                    168: 
                    169:               sseett _v_a_r_i_a_b_l_e_-_n_a_m_e _v_a_l_u_e
                    170: 
                    171:        Except  where  noted,  readline variables can take the values OOnn or OOffff
                    172:        (without regard to case).  Unrecognized  variable  names  are  ignored.
                    173:        When  a variable value is read, empty or null values, "on" (case-insen-
                    174:        sitive), and "1" are equivalent to OOnn.  All other values are equivalent
                    175:        to OOffff.  The variables and their default values are:
                    176: 
                    177:        bbeellll--ssttyyllee ((aauuddiibbllee))
                    178:               Controls  what  happens when readline wants to ring the terminal
                    179:               bell.  If set to nnoonnee, readline never rings the bell.  If set to
                    180:               vviissiibbllee,  readline  uses a visible bell if one is available.  If
                    181:               set to aauuddiibbllee, readline attempts to ring the terminal's bell.
                    182:        bbiinndd--ttttyy--ssppeecciiaall--cchhaarrss ((OOnn))
                    183:               If set to OOnn, readline attempts to bind the  control  characters
                    184:               treated specially by the kernel's terminal driver to their read-
                    185:               line equivalents.
                    186:        ccoolloorreedd--ssttaattss ((OOffff))
                    187:               If set to OOnn, readline displays possible completions using  dif-
                    188:               ferent  colors  to  indicate their file type.  The color defini-
                    189:               tions are taken from the  value  of  the  LLSS__CCOOLLOORRSS  environment
                    190:               variable.
                    191:        ccoommmmeenntt--bbeeggiinn ((````##''''))
                    192:               The  string  that is inserted in vvii mode when the iinnsseerrtt--ccoommmmeenntt
                    193:               command is executed.  This command is bound to MM--## in emacs mode
                    194:               and to ## in vi command mode.
                    195:        ccoommpplleettiioonn--ddiissppllaayy--wwiiddtthh ((--11))
                    196:               The  number  of  screen columns used to display possible matches
                    197:               when performing completion.  The value is ignored if it is  less
                    198:               than  0 or greater than the terminal screen width.  A value of 0
                    199:               will cause matches to be displayed one per  line.   The  default
                    200:               value is -1.
                    201:        ccoommpplleettiioonn--iiggnnoorree--ccaassee ((OOffff))
                    202:               If set to OOnn, readline performs filename matching and completion
                    203:               in a case-insensitive fashion.
                    204:        ccoommpplleettiioonn--mmaapp--ccaassee ((OOffff))
                    205:               If set to OOnn, and ccoommpplleettiioonn--iiggnnoorree--ccaassee  is  enabled,  readline
                    206:               treats  hyphens  (_-) and underscores (__) as equivalent when per-
                    207:               forming case-insensitive filename matching and completion.
                    208:        ccoommpplleettiioonn--pprreeffiixx--ddiissppllaayy--lleennggtthh ((00))
                    209:               The length in characters of the common prefix of a list of  pos-
                    210:               sible  completions that is displayed without modification.  When
                    211:               set to a value greater than zero, common  prefixes  longer  than
                    212:               this  value are replaced with an ellipsis when displaying possi-
                    213:               ble completions.
                    214:        ccoommpplleettiioonn--qquueerryy--iitteemmss ((110000))
                    215:               This determines when the user is queried about viewing the  num-
                    216:               ber  of  possible  completions generated by the ppoossssiibbllee--ccoommppllee--
                    217:               ttiioonnss command.  It may be set to any integer value greater  than
                    218:               or  equal  to  zero.   If  the number of possible completions is
                    219:               greater than or equal to the value of this variable, the user is
                    220:               asked  whether or not he wishes to view them; otherwise they are
                    221:               simply listed on the terminal.  A negative value causes readline
                    222:               to never ask.
                    223:        ccoonnvveerrtt--mmeettaa ((OOnn))
                    224:               If  set  to OOnn, readline will convert characters with the eighth
                    225:               bit set to an ASCII key sequence by stripping the eighth bit and
                    226:               prefixing  it  with an escape character (in effect, using escape
                    227:               as the _m_e_t_a _p_r_e_f_i_x).
                    228:        ddiissaabbllee--ccoommpplleettiioonn ((OOffff))
                    229:               If set to OOnn, readline will inhibit word completion.  Completion
                    230:               characters  will  be  inserted into the line as if they had been
                    231:               mapped to sseellff--iinnsseerrtt.
                    232:        eeddiittiinngg--mmooddee ((eemmaaccss))
                    233:               Controls whether readline begins with a set of key bindings sim-
                    234:               ilar to _E_m_a_c_s or _v_i.  eeddiittiinngg--mmooddee can be set to either eemmaaccss or
                    235:               vvii.
                    236:        eecchhoo--ccoonnttrrooll--cchhaarraacctteerrss ((OOnn))
                    237:               When set to OOnn, on operating systems that indicate they  support
                    238:               it, readline echoes a character corresponding to a signal gener-
                    239:               ated from the keyboard.
                    240:        eennaabbllee--kkeeyyppaadd ((OOffff))
                    241:               When set to OOnn, readline will try to enable the application key-
                    242:               pad  when  it  is  called.  Some systems need this to enable the
                    243:               arrow keys.
                    244:        eennaabbllee--mmeettaa--kkeeyy ((OOnn))
                    245:               When set to OOnn, readline will try to enable  any  meta  modifier
                    246:               key  the  terminal claims to support when it is called.  On many
                    247:               terminals, the meta key is used to send eight-bit characters.
                    248:        eexxppaanndd--ttiillddee ((OOffff))
                    249:               If set  to  OOnn,  tilde  expansion  is  performed  when  readline
                    250:               attempts word completion.
                    251:        hhiissttoorryy--pprreesseerrvvee--ppooiinntt ((OOffff))
                    252:               If  set  to  OOnn, the history code attempts to place point at the
                    253:               same location on each history line retrieved with  pprreevviioouuss--hhiiss--
                    254:               ttoorryy or nneexxtt--hhiissttoorryy.
                    255:        hhiissttoorryy--ssiizzee ((00))
                    256:               Set  the  maximum number of history entries saved in the history
                    257:               list.  If set to zero, any existing history entries are  deleted
                    258:               and no new entries are saved.  If set to a value less than zero,
                    259:               the number of history entries is not limited.  By  default,  the
                    260:               number of history entries is not limited.
                    261:        hhoorriizzoonnttaall--ssccrroollll--mmooddee ((OOffff))
                    262:               When  set  to  OOnn, makes readline use a single line for display,
                    263:               scrolling the input horizontally on a single screen line when it
                    264:               becomes  longer  than the screen width rather than wrapping to a
                    265:               new line.
                    266:        iinnppuutt--mmeettaa ((OOffff))
                    267:               If set to OOnn, readline will enable eight-bit input (that is,  it
                    268:               will  not  clear  the  eighth  bit  in the characters it reads),
                    269:               regardless of what the terminal claims it can support.  The name
                    270:               mmeettaa--ffllaagg is a synonym for this variable.
                    271:        iisseeaarrcchh--tteerrmmiinnaattoorrss ((````CC--[[ CC--JJ''''))
                    272:               The  string  of  characters that should terminate an incremental
                    273:               search without subsequently executing the character  as  a  com-
                    274:               mand.   If this variable has not been given a value, the charac-
                    275:               ters _E_S_C and _C_-_J will terminate an incremental search.
                    276:        kkeeyymmaapp ((eemmaaccss))
                    277:               Set the current readline keymap.  The set of legal keymap  names
                    278:               is  _e_m_a_c_s_,  _e_m_a_c_s_-_s_t_a_n_d_a_r_d_, _e_m_a_c_s_-_m_e_t_a_, _e_m_a_c_s_-_c_t_l_x_, _v_i_, _v_i_-_m_o_v_e_,
                    279:               _v_i_-_c_o_m_m_a_n_d, and _v_i_-_i_n_s_e_r_t.   _v_i  is  equivalent  to  _v_i_-_c_o_m_m_a_n_d;
                    280:               _e_m_a_c_s  is  equivalent  to  _e_m_a_c_s_-_s_t_a_n_d_a_r_d.  The default value is
                    281:               _e_m_a_c_s.  The value  of  eeddiittiinngg--mmooddee  also  affects  the  default
                    282:               keymap.
                    283:        kkeeyysseeqq--ttiimmeeoouutt ((550000))
                    284:               Specifies  the  duration _r_e_a_d_l_i_n_e will wait for a character when
                    285:               reading an ambiguous key sequence (one that can form a  complete
                    286:               key sequence using the input read so far, or can take additional
                    287:               input to complete a  longer  key  sequence).   If  no  input  is
                    288:               received  within  the timeout, _r_e_a_d_l_i_n_e will use the shorter but
                    289:               complete key sequence.  The value is specified in  milliseconds,
                    290:               so  a value of 1000 means that _r_e_a_d_l_i_n_e will wait one second for
                    291:               additional input.  If this variable is set to a value less  than
                    292:               or  equal to zero, or to a non-numeric value, _r_e_a_d_l_i_n_e will wait
                    293:               until another key is pressed to decide  which  key  sequence  to
                    294:               complete.
                    295:        mmaarrkk--ddiirreeccttoorriieess ((OOnn))
                    296:               If set to OOnn, completed directory names have a slash appended.
                    297:        mmaarrkk--mmooddiiffiieedd--lliinneess ((OOffff))
                    298:               If  set  to  OOnn,  history lines that have been modified are dis-
                    299:               played with a preceding asterisk (**).
                    300:        mmaarrkk--ssyymmlliinnkkeedd--ddiirreeccttoorriieess ((OOffff))
                    301:               If set to OOnn, completed names which are symbolic links to direc-
                    302:               tories   have   a  slash  appended  (subject  to  the  value  of
                    303:               mmaarrkk--ddiirreeccttoorriieess).
                    304:        mmaattcchh--hhiiddddeenn--ffiilleess ((OOnn))
                    305:               This variable, when set to OOnn, causes readline  to  match  files
                    306:               whose  names  begin  with  a  `.' (hidden files) when performing
                    307:               filename completion.  If set to OOffff, the  leading  `.'  must  be
                    308:               supplied by the user in the filename to be completed.
                    309:        mmeennuu--ccoommpplleettee--ddiissppllaayy--pprreeffiixx ((OOffff))
                    310:               If  set to OOnn, menu completion displays the common prefix of the
                    311:               list of possible completions (which may be empty) before cycling
                    312:               through the list.
                    313:        oouuttppuutt--mmeettaa ((OOffff))
                    314:               If  set  to OOnn, readline will display characters with the eighth
                    315:               bit set directly rather than as a meta-prefixed escape sequence.
                    316:        ppaaggee--ccoommpplleettiioonnss ((OOnn))
                    317:               If  set to OOnn, readline uses an internal _m_o_r_e-like pager to dis-
                    318:               play a screenful of possible completions at a time.
                    319:        pprriinntt--ccoommpplleettiioonnss--hhoorriizzoonnttaallllyy ((OOffff))
                    320:               If set to OOnn, readline will  display  completions  with  matches
                    321:               sorted  horizontally in alphabetical order, rather than down the
                    322:               screen.
                    323:        rreevveerrtt--aallll--aatt--nneewwlliinnee ((OOffff))
                    324:               If set to OOnn, readline will undo all changes  to  history  lines
                    325:               before returning when aacccceepptt--lliinnee is executed.  By default, his-
                    326:               tory lines may be modified  and  retain  individual  undo  lists
                    327:               across calls to rreeaaddlliinnee.
                    328:        sshhooww--aallll--iiff--aammbbiigguuoouuss ((OOffff))
                    329:               This  alters  the  default behavior of the completion functions.
                    330:               If set to OOnn, words which have more than one possible completion
                    331:               cause  the  matches  to be listed immediately instead of ringing
                    332:               the bell.
                    333:        sshhooww--aallll--iiff--uunnmmooddiiffiieedd ((OOffff))
                    334:               This alters the default behavior of the completion functions  in
                    335:               a fashion similar to sshhooww--aallll--iiff--aammbbiigguuoouuss.  If set to OOnn, words
                    336:               which have more than one possible completion without any  possi-
                    337:               ble  partial  completion (the possible completions don't share a
                    338:               common prefix)  cause  the  matches  to  be  listed  immediately
                    339:               instead of ringing the bell.
                    340:        sshhooww--mmooddee--iinn--pprroommpptt ((OOffff))
                    341:               If  set  to  OOnn,  add a character to the beginning of the prompt
                    342:               indicating the editing mode: emacs (@), vi  command  (:)  or  vi
                    343:               insertion (+).
                    344:        sskkiipp--ccoommpplleetteedd--tteexxtt ((OOffff))
                    345:               If  set  to OOnn, this alters the default completion behavior when
                    346:               inserting a single match into the line.  It's only  active  when
                    347:               performing  completion  in  the  middle  of a word.  If enabled,
                    348:               readline does not insert characters  from  the  completion  that
                    349:               match  characters  after  point  in the word being completed, so
                    350:               portions of the word following the cursor are not duplicated.
                    351:        vviissiibbllee--ssttaattss ((OOffff))
                    352:               If set to OOnn, a character denoting a file's type as reported  by
                    353:               _s_t_a_t(2)  is  appended to the filename when listing possible com-
                    354:               pletions.
                    355: 
                    356:    CCoonnddiittiioonnaall CCoonnssttrruuccttss
                    357:        Readline implements a facility similar in  spirit  to  the  conditional
                    358:        compilation  features  of  the C preprocessor which allows key bindings
                    359:        and variable settings to be performed as the result  of  tests.   There
                    360:        are four parser directives used.
                    361: 
                    362:        $$iiff    The  $$iiff construct allows bindings to be made based on the edit-
                    363:               ing mode, the terminal being  used,  or  the  application  using
                    364:               readline.   The text of the test extends to the end of the line;
                    365:               no characters are required to isolate it.
                    366: 
                    367:               mmooddee   The mmooddee== form of the  $$iiff  directive  is  used  to  test
                    368:                      whether  readline  is  in  emacs or vi mode.  This may be
                    369:                      used in conjunction with  the  sseett  kkeeyymmaapp  command,  for
                    370:                      instance,  to  set  bindings  in  the  _e_m_a_c_s_-_s_t_a_n_d_a_r_d and
                    371:                      _e_m_a_c_s_-_c_t_l_x keymaps only if readline is  starting  out  in
                    372:                      emacs mode.
                    373: 
                    374:               tteerrmm   The  tteerrmm==  form may be used to include terminal-specific
                    375:                      key bindings, perhaps to bind the key sequences output by
                    376:                      the terminal's function keys.  The word on the right side
                    377:                      of the == is tested against the full name of the  terminal
                    378:                      and  the portion of the terminal name before the first --.
                    379:                      This allows _s_u_n  to  match  both  _s_u_n  and  _s_u_n_-_c_m_d,  for
                    380:                      instance.
                    381: 
                    382:               aapppplliiccaattiioonn
                    383:                      The aapppplliiccaattiioonn construct is used to include application-
                    384:                      specific  settings.   Each  program  using  the  readline
                    385:                      library  sets the _a_p_p_l_i_c_a_t_i_o_n _n_a_m_e, and an initialization
                    386:                      file can test for a particular value.  This could be used
                    387:                      to  bind key sequences to functions useful for a specific
                    388:                      program.  For instance, the following command adds a  key
                    389:                      sequence  that  quotes  the  current  or previous word in
                    390:                      bbaasshh:
                    391: 
                    392:                      $$iiff Bash
                    393:                      # Quote the current or previous word
                    394:                      "\C-xq": "\eb\"\ef\""
                    395:                      $$eennddiiff
                    396: 
                    397:        $$eennddiiff This command, as seen in the previous example, terminates an $$iiff
                    398:               command.
                    399: 
                    400:        $$eellssee  Commands in this branch of the $$iiff directive are executed if the
                    401:               test fails.
                    402: 
                    403:        $$iinncclluuddee
                    404:               This directive takes a single filename as an argument and  reads
                    405:               commands  and bindings from that file.  For example, the follow-
                    406:               ing directive would read _/_e_t_c_/_i_n_p_u_t_r_c:
                    407: 
                    408:               $$iinncclluuddee  _/_e_t_c_/_i_n_p_u_t_r_c
                    409: 
                    410: SSEEAARRCCHHIINNGG
                    411:        Readline provides commands for searching through  the  command  history
                    412:        for  lines  containing a specified string.  There are two search modes:
                    413:        _i_n_c_r_e_m_e_n_t_a_l and _n_o_n_-_i_n_c_r_e_m_e_n_t_a_l.
                    414: 
                    415:        Incremental searches begin before the  user  has  finished  typing  the
                    416:        search  string.  As each character of the search string is typed, read-
                    417:        line displays the next entry from the history matching the string typed
                    418:        so  far.   An  incremental  search  requires only as many characters as
                    419:        needed to find the desired history entry.  To search  backward  in  the
                    420:        history for a particular string, type CC--rr.  Typing CC--ss searches forward
                    421:        through the history.  The  characters  present  in  the  value  of  the
                    422:        iisseeaarrcchh--tteerrmmiinnaattoorrss  variable  are  used  to  terminate  an incremental
                    423:        search.  If that variable has not been assigned a value the _E_s_c_a_p_e  and
                    424:        CC--JJ characters will terminate an incremental search.  CC--GG will abort an
                    425:        incremental search and restore the original line.  When the  search  is
                    426:        terminated,  the history entry containing the search string becomes the
                    427:        current line.
                    428: 
                    429:        To find other matching entries in the history list, type CC--ss or CC--rr  as
                    430:        appropriate.   This  will search backward or forward in the history for
                    431:        the next line matching the search string typed so far.  Any  other  key
                    432:        sequence bound to a readline command will terminate the search and exe-
                    433:        cute that command.  For instance, a newline will terminate  the  search
                    434:        and  accept  the  line,  thereby executing the command from the history
                    435:        list.  A movement command will terminate the search, make the last line
                    436:        found the current line, and begin editing.
                    437: 
                    438:        Non-incremental  searches read the entire search string before starting
                    439:        to search for matching history lines.  The search string may  be  typed
                    440:        by the user or be part of the contents of the current line.
                    441: 
                    442: EEDDIITTIINNGG CCOOMMMMAANNDDSS
                    443:        The  following  is  a list of the names of the commands and the default
                    444:        key sequences to which they are bound.  Command names without an accom-
                    445:        panying key sequence are unbound by default.
                    446: 
                    447:        In the following descriptions, _p_o_i_n_t refers to the current cursor posi-
                    448:        tion, and _m_a_r_k refers to a cursor position saved by the  sseett--mmaarrkk  com-
                    449:        mand.   The  text  between  the  point  and  mark is referred to as the
                    450:        _r_e_g_i_o_n.
                    451: 
                    452:    CCoommmmaannddss ffoorr MMoovviinngg
                    453:        bbeeggiinnnniinngg--ooff--lliinnee ((CC--aa))
                    454:               Move to the start of the current line.
                    455:        eenndd--ooff--lliinnee ((CC--ee))
                    456:               Move to the end of the line.
                    457:        ffoorrwwaarrdd--cchhaarr ((CC--ff))
                    458:               Move forward a character.
                    459:        bbaacckkwwaarrdd--cchhaarr ((CC--bb))
                    460:               Move back a character.
                    461:        ffoorrwwaarrdd--wwoorrdd ((MM--ff))
                    462:               Move forward to the end of the next word.  Words are composed of
                    463:               alphanumeric characters (letters and digits).
                    464:        bbaacckkwwaarrdd--wwoorrdd ((MM--bb))
                    465:               Move  back  to the start of the current or previous word.  Words
                    466:               are composed of alphanumeric characters (letters and digits).
                    467:        cclleeaarr--ssccrreeeenn ((CC--ll))
                    468:               Clear the screen leaving the current line  at  the  top  of  the
                    469:               screen.   With  an  argument,  refresh  the current line without
                    470:               clearing the screen.
                    471:        rreeddrraaww--ccuurrrreenntt--lliinnee
                    472:               Refresh the current line.
                    473: 
                    474:    CCoommmmaannddss ffoorr MMaanniippuullaattiinngg tthhee HHiissttoorryy
                    475:        aacccceepptt--lliinnee ((NNeewwlliinnee,, RReettuurrnn))
                    476:               Accept the line regardless of where the cursor is.  If this line
                    477:               is  non-empty,  it  may  be added to the history list for future
                    478:               recall with aadddd__hhiissttoorryy(()).  If the line is  a  modified  history
                    479:               line, the history line is restored to its original state.
                    480:        pprreevviioouuss--hhiissttoorryy ((CC--pp))
                    481:               Fetch the previous command from the history list, moving back in
                    482:               the list.
                    483:        nneexxtt--hhiissttoorryy ((CC--nn))
                    484:               Fetch the next command from the history list, moving forward  in
                    485:               the list.
                    486:        bbeeggiinnnniinngg--ooff--hhiissttoorryy ((MM--<<))
                    487:               Move to the first line in the history.
                    488:        eenndd--ooff--hhiissttoorryy ((MM-->>))
                    489:               Move  to  the end of the input history, i.e., the line currently
                    490:               being entered.
                    491:        rreevveerrssee--sseeaarrcchh--hhiissttoorryy ((CC--rr))
                    492:               Search backward starting at the current  line  and  moving  `up'
                    493:               through  the  history  as  necessary.   This  is  an incremental
                    494:               search.
                    495:        ffoorrwwaarrdd--sseeaarrcchh--hhiissttoorryy ((CC--ss))
                    496:               Search forward starting at the current line  and  moving  `down'
                    497:               through  the  history  as  necessary.   This  is  an incremental
                    498:               search.
                    499:        nnoonn--iinnccrreemmeennttaall--rreevveerrssee--sseeaarrcchh--hhiissttoorryy ((MM--pp))
                    500:               Search backward through the history starting at the current line
                    501:               using  a  non-incremental  search  for  a string supplied by the
                    502:               user.
                    503:        nnoonn--iinnccrreemmeennttaall--ffoorrwwaarrdd--sseeaarrcchh--hhiissttoorryy ((MM--nn))
                    504:               Search forward  through  the  history  using  a  non-incremental
                    505:               search for a string supplied by the user.
                    506:        hhiissttoorryy--sseeaarrcchh--bbaacckkwwaarrdd
                    507:               Search backward through the history for the string of characters
                    508:               between the start of the current line  and  the  current  cursor
                    509:               position  (the  _p_o_i_n_t).   The  search  string  must match at the
                    510:               beginning of a history line.  This is a non-incremental  search.
                    511:        hhiissttoorryy--sseeaarrcchh--ffoorrwwaarrdd
                    512:               Search  forward through the history for the string of characters
                    513:               between the start of the current line and the point.  The search
                    514:               string must match at the beginning of a history line.  This is a
                    515:               non-incremental search.
                    516:        hhiissttoorryy--ssuubbssttrriinngg--sseeaarrcchh--bbaacckkwwaarrdd
                    517:               Search backward through the history for the string of characters
                    518:               between  the  start  of  the current line and the current cursor
                    519:               position (the _p_o_i_n_t).  The search string may match anywhere in a
                    520:               history line.  This is a non-incremental search.
                    521:        hhiissttoorryy--ssuubbssttrriinngg--sseeaarrcchh--ffoorrwwaarrdd
                    522:               Search  forward through the history for the string of characters
                    523:               between the start of the current line and the point.  The search
                    524:               string  may  match  anywhere  in a history line.  This is a non-
                    525:               incremental search.
                    526:        yyaannkk--nntthh--aarrgg ((MM--CC--yy))
                    527:               Insert the first argument to the previous command  (usually  the
                    528:               second word on the previous line) at point.  With an argument _n,
                    529:               insert the _nth word from the previous command (the words in  the
                    530:               previous  command  begin  with  word  0).   A  negative argument
                    531:               inserts the _nth word from the end of the previous command.  Once
                    532:               the  argument _n is computed, the argument is extracted as if the
                    533:               "!_n" history expansion had been specified.
                    534:        yyaannkk--llaasstt--aarrgg ((MM--..,, MM--__))
                    535:               Insert the last argument to the previous command (the last  word
                    536:               of the previous history entry).  With a numeric argument, behave
                    537:               exactly like yyaannkk--nntthh--aarrgg.  Successive  calls  to  yyaannkk--llaasstt--aarrgg
                    538:               move  back through the history list, inserting the last word (or
                    539:               the word specified by the argument to the first  call)  of  each
                    540:               line in turn.  Any numeric argument supplied to these successive
                    541:               calls determines the direction to move through the  history.   A
                    542:               negative  argument  switches  the  direction through the history
                    543:               (back or forward).  The history expansion facilities are used to
                    544:               extract  the last argument, as if the "!$" history expansion had
                    545:               been specified.
                    546: 
                    547:    CCoommmmaannddss ffoorr CChhaannggiinngg TTeexxtt
                    548:        _e_n_d_-_o_f_-_f_i_l_e ((uussuuaallllyy CC--dd))
                    549:               The character indicating end-of-file as  set,  for  example,  by
                    550:               ``stty''.   If  this character is read when there are no charac-
                    551:               ters on the line, and point is at the  beginning  of  the  line,
                    552:               Readline interprets it as the end of input and returns EEOOFF.
                    553:        ddeelleettee--cchhaarr ((CC--dd))
                    554:               Delete the character at point.  If this function is bound to the
                    555:               same character as the tty EEOOFF character, as CC--dd commonly is, see
                    556:               above for the effects.
                    557:        bbaacckkwwaarrdd--ddeelleettee--cchhaarr ((RRuubboouutt))
                    558:               Delete  the  character  behind the cursor.  When given a numeric
                    559:               argument, save the deleted text on the kill ring.
                    560:        ffoorrwwaarrdd--bbaacckkwwaarrdd--ddeelleettee--cchhaarr
                    561:               Delete the character under the cursor, unless the cursor  is  at
                    562:               the end of the line, in which case the character behind the cur-
                    563:               sor is deleted.
                    564:        qquuootteedd--iinnsseerrtt ((CC--qq,, CC--vv))
                    565:               Add the next character that you type to the line verbatim.  This
                    566:               is how to insert characters like CC--qq, for example.
                    567:        ttaabb--iinnsseerrtt ((MM--TTAABB))
                    568:               Insert a tab character.
                    569:        sseellff--iinnsseerrtt ((aa,, bb,, AA,, 11,, !!,, ......))
                    570:               Insert the character typed.
                    571:        ttrraannssppoossee--cchhaarrss ((CC--tt))
                    572:               Drag  the  character  before point forward over the character at
                    573:               point, moving point forward as well.  If point is at the end  of
                    574:               the  line, then this transposes the two characters before point.
                    575:               Negative arguments have no effect.
                    576:        ttrraannssppoossee--wwoorrddss ((MM--tt))
                    577:               Drag the word before point past the  word  after  point,  moving
                    578:               point  over  that  word  as well.  If point is at the end of the
                    579:               line, this transposes the last two words on the line.
                    580:        uuppccaassee--wwoorrdd ((MM--uu))
                    581:               Uppercase the current (or  following)  word.   With  a  negative
                    582:               argument, uppercase the previous word, but do not move point.
                    583:        ddoowwnnccaassee--wwoorrdd ((MM--ll))
                    584:               Lowercase  the  current  (or  following)  word.  With a negative
                    585:               argument, lowercase the previous word, but do not move point.
                    586:        ccaappiittaalliizzee--wwoorrdd ((MM--cc))
                    587:               Capitalize the current (or following)  word.   With  a  negative
                    588:               argument, capitalize the previous word, but do not move point.
                    589:        oovveerrwwrriittee--mmooddee
                    590:               Toggle  overwrite mode.  With an explicit positive numeric argu-
                    591:               ment, switches to overwrite mode.  With an explicit non-positive
                    592:               numeric argument, switches to insert mode.  This command affects
                    593:               only eemmaaccss mode; vvii mode does overwrite differently.  Each  call
                    594:               to _r_e_a_d_l_i_n_e_(_) starts in insert mode.  In overwrite mode, charac-
                    595:               ters bound to sseellff--iinnsseerrtt replace the text at point rather  than
                    596:               pushing  the  text  to  the  right.   Characters  bound to bbaacckk--
                    597:               wwaarrdd--ddeelleettee--cchhaarr replace  the  character  before  point  with  a
                    598:               space.  By default, this command is unbound.
                    599: 
                    600:    KKiilllliinngg aanndd YYaannkkiinngg
                    601:        kkiillll--lliinnee ((CC--kk))
                    602:               Kill the text from point to the end of the line.
                    603:        bbaacckkwwaarrdd--kkiillll--lliinnee ((CC--xx RRuubboouutt))
                    604:               Kill backward to the beginning of the line.
                    605:        uunniixx--lliinnee--ddiissccaarrdd ((CC--uu))
                    606:               Kill  backward  from  point  to  the beginning of the line.  The
                    607:               killed text is saved on the kill-ring.
                    608:        kkiillll--wwhhoollee--lliinnee
                    609:               Kill all characters on the current line, no matter  where  point
                    610:               is.
                    611:        kkiillll--wwoorrdd ((MM--dd))
                    612:               Kill  from  point  the  end  of  the current word, or if between
                    613:               words, to the end of the next word.   Word  boundaries  are  the
                    614:               same as those used by ffoorrwwaarrdd--wwoorrdd.
                    615:        bbaacckkwwaarrdd--kkiillll--wwoorrdd ((MM--RRuubboouutt))
                    616:               Kill  the  word  behind  point.  Word boundaries are the same as
                    617:               those used by bbaacckkwwaarrdd--wwoorrdd.
                    618:        uunniixx--wwoorrdd--rruubboouutt ((CC--ww))
                    619:               Kill the word behind point, using white space as a  word  bound-
                    620:               ary.  The killed text is saved on the kill-ring.
                    621:        uunniixx--ffiilleennaammee--rruubboouutt
                    622:               Kill  the  word  behind  point,  using white space and the slash
                    623:               character as the word boundaries.  The killed text is  saved  on
                    624:               the kill-ring.
                    625:        ddeelleettee--hhoorriizzoonnttaall--ssppaaccee ((MM--\\))
                    626:               Delete all spaces and tabs around point.
                    627:        kkiillll--rreeggiioonn
                    628:               Kill  the  text  between  the point and _m_a_r_k (saved cursor posi-
                    629:               tion).  This text is referred to as the _r_e_g_i_o_n.
                    630:        ccooppyy--rreeggiioonn--aass--kkiillll
                    631:               Copy the text in the region to the kill buffer.
                    632:        ccooppyy--bbaacckkwwaarrdd--wwoorrdd
                    633:               Copy the word before point to the kill buffer.  The word  bound-
                    634:               aries are the same as bbaacckkwwaarrdd--wwoorrdd.
                    635:        ccooppyy--ffoorrwwaarrdd--wwoorrdd
                    636:               Copy  the  word  following  point  to the kill buffer.  The word
                    637:               boundaries are the same as ffoorrwwaarrdd--wwoorrdd.
                    638:        yyaannkk ((CC--yy))
                    639:               Yank the top of the kill ring into the buffer at point.
                    640:        yyaannkk--ppoopp ((MM--yy))
                    641:               Rotate the kill ring, and yank the new top.  Only works  follow-
                    642:               ing yyaannkk or yyaannkk--ppoopp.
                    643: 
                    644:    NNuummeerriicc AArrgguummeennttss
                    645:        ddiiggiitt--aarrgguummeenntt ((MM--00,, MM--11,, ......,, MM----))
                    646:               Add  this digit to the argument already accumulating, or start a
                    647:               new argument.  M-- starts a negative argument.
                    648:        uunniivveerrssaall--aarrgguummeenntt
                    649:               This is another way to specify an argument.  If this command  is
                    650:               followed  by one or more digits, optionally with a leading minus
                    651:               sign, those digits define the argument.  If the command is  fol-
                    652:               lowed  by  digits,  executing  uunniivveerrssaall--aarrgguummeenntt again ends the
                    653:               numeric argument, but is otherwise ignored.  As a special  case,
                    654:               if  this  command is immediately followed by a character that is
                    655:               neither a digit or minus sign, the argument count for  the  next
                    656:               command  is multiplied by four.  The argument count is initially
                    657:               one, so executing this function the first time makes  the  argu-
                    658:               ment count four, a second time makes the argument count sixteen,
                    659:               and so on.
                    660: 
                    661:    CCoommpplleettiinngg
                    662:        ccoommpplleettee ((TTAABB))
                    663:               Attempt to perform completion on the  text  before  point.   The
                    664:               actual  completion performed is application-specific.  BBaasshh, for
                    665:               instance, attempts completion treating the text  as  a  variable
                    666:               (if  the  text begins with $$), username (if the text begins with
                    667:               ~~), hostname (if the text begins with @@), or command  (including
                    668:               aliases  and  functions)  in  turn.  If none of these produces a
                    669:               match, filename completion is  attempted.   GGddbb,  on  the  other
                    670:               hand,  allows completion of program functions and variables, and
                    671:               only attempts filename completion under certain circumstances.
                    672:        ppoossssiibbllee--ccoommpplleettiioonnss ((MM--??))
                    673:               List the possible completions of the text  before  point.   When
                    674:               displaying completions, readline sets the number of columns used
                    675:               for display to the value of ccoommpplleettiioonn--ddiissppllaayy--wwiiddtthh, the  value
                    676:               of  the  environment  variable  CCOOLLUUMMNNSS, or the screen width, in
                    677:               that order.
                    678:        iinnsseerrtt--ccoommpplleettiioonnss ((MM--**))
                    679:               Insert all completions of the text before point that would  have
                    680:               been generated by ppoossssiibbllee--ccoommpplleettiioonnss.
                    681:        mmeennuu--ccoommpplleettee
                    682:               Similar  to ccoommpplleettee, but replaces the word to be completed with
                    683:               a single match from the list of possible completions.   Repeated
                    684:               execution  of  mmeennuu--ccoommpplleettee  steps through the list of possible
                    685:               completions, inserting each match in turn.  At the  end  of  the
                    686:               list of completions, the bell is rung (subject to the setting of
                    687:               bbeellll--ssttyyllee) and the original text is restored.  An argument of _n
                    688:               moves  _n  positions  forward  in the list of matches; a negative
                    689:               argument may be used to move backward through  the  list.   This
                    690:               command  is  intended  to  be  bound  to  TTAABB, but is unbound by
                    691:               default.
                    692:        mmeennuu--ccoommpplleettee--bbaacckkwwaarrdd
                    693:               Identical to mmeennuu--ccoommpplleettee, but moves backward through the  list
                    694:               of  possible  completions,  as if mmeennuu--ccoommpplleettee had been given a
                    695:               negative argument.  This command is unbound by default.
                    696:        ddeelleettee--cchhaarr--oorr--lliisstt
                    697:               Deletes the character under the cursor if not at  the  beginning
                    698:               or  end  of  the  line (like ddeelleettee--cchhaarr).  If at the end of the
                    699:               line, behaves identically to ppoossssiibbllee--ccoommpplleettiioonnss.
                    700: 
                    701:    KKeeyybbooaarrdd MMaaccrrooss
                    702:        ssttaarrtt--kkbbdd--mmaaccrroo ((CC--xx (())
                    703:               Begin saving the characters  typed  into  the  current  keyboard
                    704:               macro.
                    705:        eenndd--kkbbdd--mmaaccrroo ((CC--xx ))))
                    706:               Stop saving the characters typed into the current keyboard macro
                    707:               and store the definition.
                    708:        ccaallll--llaasstt--kkbbdd--mmaaccrroo ((CC--xx ee))
                    709:               Re-execute the last keyboard macro defined, by making the  char-
                    710:               acters  in  the  macro  appear  as  if  typed  at  the keyboard.
                    711:               pprriinntt--llaasstt--kkbbdd--mmaaccrroo (()) Print the last keyboard macro defined in
                    712:               a format suitable for the _i_n_p_u_t_r_c file.
                    713: 
                    714:    MMiisscceellllaanneeoouuss
                    715:        rree--rreeaadd--iinniitt--ffiillee ((CC--xx CC--rr))
                    716:               Read  in  the  contents of the _i_n_p_u_t_r_c file, and incorporate any
                    717:               bindings or variable assignments found there.
                    718:        aabboorrtt ((CC--gg))
                    719:               Abort the current editing command and ring the  terminal's  bell
                    720:               (subject to the setting of bbeellll--ssttyyllee).
                    721:        ddoo--uuppppeerrccaassee--vveerrssiioonn ((MM--aa,, MM--bb,, MM--_x,, ......))
                    722:               If  the  metafied character _x is lowercase, run the command that
                    723:               is bound to the corresponding uppercase character.
                    724:        pprreeffiixx--mmeettaa ((EESSCC))
                    725:               Metafy the next character typed.  EESSCC ff is equivalent to MMeettaa--ff.
                    726:        uunnddoo ((CC--__,, CC--xx CC--uu))
                    727:               Incremental undo, separately remembered for each line.
                    728:        rreevveerrtt--lliinnee ((MM--rr))
                    729:               Undo  all changes made to this line.  This is like executing the
                    730:               uunnddoo command enough times to return  the  line  to  its  initial
                    731:               state.
                    732:        ttiillddee--eexxppaanndd ((MM--&&))
                    733:               Perform tilde expansion on the current word.
                    734:        sseett--mmaarrkk ((CC--@@,, MM--<<ssppaaccee>>))
                    735:               Set  the  mark to the point.  If a numeric argument is supplied,
                    736:               the mark is set to that position.
                    737:        eexxcchhaannggee--ppooiinntt--aanndd--mmaarrkk ((CC--xx CC--xx))
                    738:               Swap the point with the mark.  The current  cursor  position  is
                    739:               set  to the saved position, and the old cursor position is saved
                    740:               as the mark.
                    741:        cchhaarraacctteerr--sseeaarrcchh ((CC--]]))
                    742:               A character is read and point is moved to the next occurrence of
                    743:               that  character.   A negative count searches for previous occur-
                    744:               rences.
                    745:        cchhaarraacctteerr--sseeaarrcchh--bbaacckkwwaarrdd ((MM--CC--]]))
                    746:               A character is read and point is moved to  the  previous  occur-
                    747:               rence  of  that character.  A negative count searches for subse-
                    748:               quent occurrences.
                    749:        sskkiipp--ccssii--sseeqquueennccee
                    750:               Read enough characters to consume a multi-key sequence  such  as
                    751:               those  defined for keys like Home and End.  Such sequences begin
                    752:               with a Control Sequence Indicator (CSI), usually ESC-[.  If this
                    753:               sequence  is  bound  to "\[", keys producing such sequences will
                    754:               have no effect unless explicitly bound to  a  readline  command,
                    755:               instead  of  inserting stray characters into the editing buffer.
                    756:               This is unbound by default, but usually bound to ESC-[.
                    757:        iinnsseerrtt--ccoommmmeenntt ((MM--##))
                    758:               Without a numeric argument,  the  value  of  the  readline  ccoomm--
                    759:               mmeenntt--bbeeggiinn  variable is inserted at the beginning of the current
                    760:               line.  If a numeric argument is supplied, this command acts as a
                    761:               toggle:   if  the characters at the beginning of the line do not
                    762:               match the value of ccoommmmeenntt--bbeeggiinn, the value is inserted,  other-
                    763:               wise the characters in ccoommmmeenntt--bbeeggiinn are deleted from the begin-
                    764:               ning of the line.  In either case, the line is accepted as if  a
                    765:               newline  had  been  typed.   The  default value of ccoommmmeenntt--bbeeggiinn
                    766:               makes the current line a shell comment.  If a  numeric  argument
                    767:               causes  the  comment  character  to be removed, the line will be
                    768:               executed by the shell.
                    769:        dduummpp--ffuunnccttiioonnss
                    770:               Print all of the functions and their key bindings to  the  read-
                    771:               line output stream.  If a numeric argument is supplied, the out-
                    772:               put is formatted in such a way that it can be made  part  of  an
                    773:               _i_n_p_u_t_r_c file.
                    774:        dduummpp--vvaarriiaabblleess
                    775:               Print  all  of  the  settable  variables and their values to the
                    776:               readline output stream.  If a numeric argument is supplied,  the
                    777:               output is formatted in such a way that it can be made part of an
                    778:               _i_n_p_u_t_r_c file.
                    779:        dduummpp--mmaaccrrooss
                    780:               Print all of the readline key sequences bound to macros and  the
                    781:               strings  they  output.   If  a numeric argument is supplied, the
                    782:               output is formatted in such a way that it can be made part of an
                    783:               _i_n_p_u_t_r_c file.
                    784:        eemmaaccss--eeddiittiinngg--mmooddee ((CC--ee))
                    785:               When  in  vvii command mode, this causes a switch to eemmaaccss editing
                    786:               mode.
                    787:        vvii--eeddiittiinngg--mmooddee ((MM--CC--jj))
                    788:               When in eemmaaccss editing mode, this causes a switch to  vvii  editing
                    789:               mode.
                    790: 
                    791: DDEEFFAAUULLTT KKEEYY BBIINNDDIINNGGSS
                    792:        The  following is a list of the default emacs and vi bindings.  Charac-
                    793:        ters with the eighth bit set are  written  as  M-<character>,  and  are
                    794:        referred to as _m_e_t_a_f_i_e_d characters.  The printable ASCII characters not
                    795:        mentioned in the list of emacs  standard  bindings  are  bound  to  the
                    796:        sseellff--iinnsseerrtt  function,  which just inserts the given character into the
                    797:        input line.  In vi insertion mode, all characters not specifically men-
                    798:        tioned are bound to sseellff--iinnsseerrtt.  Characters assigned to signal genera-
                    799:        tion by _s_t_t_y(1) or the terminal driver, such as C-Z or C-C, retain that
                    800:        function.   Upper  and  lower case metafied characters are bound to the
                    801:        same function in the emacs mode meta keymap.  The remaining  characters
                    802:        are  unbound,  which  causes  readline to ring the bell (subject to the
                    803:        setting of the bbeellll--ssttyyllee variable).
                    804: 
                    805:    EEmmaaccss MMooddee
                    806:              Emacs Standard bindings
                    807: 
                    808:              "C-@"  set-mark
                    809:              "C-A"  beginning-of-line
                    810:              "C-B"  backward-char
                    811:              "C-D"  delete-char
                    812:              "C-E"  end-of-line
                    813:              "C-F"  forward-char
                    814:              "C-G"  abort
                    815:              "C-H"  backward-delete-char
                    816:              "C-I"  complete
                    817:              "C-J"  accept-line
                    818:              "C-K"  kill-line
                    819:              "C-L"  clear-screen
                    820:              "C-M"  accept-line
                    821:              "C-N"  next-history
                    822:              "C-P"  previous-history
                    823:              "C-Q"  quoted-insert
                    824:              "C-R"  reverse-search-history
                    825:              "C-S"  forward-search-history
                    826:              "C-T"  transpose-chars
                    827:              "C-U"  unix-line-discard
                    828:              "C-V"  quoted-insert
                    829:              "C-W"  unix-word-rubout
                    830:              "C-Y"  yank
                    831:              "C-]"  character-search
                    832:              "C-_"  undo
                    833:              " " to "/"  self-insert
                    834:              "0"  to "9"  self-insert
                    835:              ":"  to "~"  self-insert
                    836:              "C-?"  backward-delete-char
                    837: 
                    838:              Emacs Meta bindings
                    839: 
                    840:              "M-C-G"  abort
                    841:              "M-C-H"  backward-kill-word
                    842:              "M-C-I"  tab-insert
                    843:              "M-C-J"  vi-editing-mode
                    844:              "M-C-M"  vi-editing-mode
                    845:              "M-C-R"  revert-line
                    846:              "M-C-Y"  yank-nth-arg
                    847:              "M-C-["  complete
                    848:              "M-C-]"  character-search-backward
                    849:              "M-space"  set-mark
                    850:              "M-#"  insert-comment
                    851:              "M-&"  tilde-expand
                    852:              "M-*"  insert-completions
                    853:              "M--"  digit-argument
                    854:              "M-."  yank-last-arg
                    855:              "M-0"  digit-argument
                    856:              "M-1"  digit-argument
                    857:              "M-2"  digit-argument
                    858:              "M-3"  digit-argument
                    859:              "M-4"  digit-argument
                    860:              "M-5"  digit-argument
                    861:              "M-6"  digit-argument
                    862:              "M-7"  digit-argument
                    863:              "M-8"  digit-argument
                    864:              "M-9"  digit-argument
                    865:              "M-<"  beginning-of-history
                    866:              "M-="  possible-completions
                    867:              "M->"  end-of-history
                    868:              "M-?"  possible-completions
                    869:              "M-B"  backward-word
                    870:              "M-C"  capitalize-word
                    871:              "M-D"  kill-word
                    872:              "M-F"  forward-word
                    873:              "M-L"  downcase-word
                    874:              "M-N"  non-incremental-forward-search-history
                    875:              "M-P"  non-incremental-reverse-search-history
                    876:              "M-R"  revert-line
                    877:              "M-T"  transpose-words
                    878:              "M-U"  upcase-word
                    879:              "M-Y"  yank-pop
                    880:              "M-\"  delete-horizontal-space
                    881:              "M-~"  tilde-expand
                    882:              "M-C-?"  backward-kill-word
                    883:              "M-_"  yank-last-arg
                    884: 
                    885:              Emacs Control-X bindings
                    886: 
                    887:              "C-XC-G"  abort
                    888:              "C-XC-R"  re-read-init-file
                    889:              "C-XC-U"  undo
                    890:              "C-XC-X"  exchange-point-and-mark
                    891:              "C-X("  start-kbd-macro
                    892:              "C-X)"  end-kbd-macro
                    893:              "C-XE"  call-last-kbd-macro
                    894:              "C-XC-?"  backward-kill-line
                    895: 
                    896: 
                    897:    VVII MMooddee bbiinnddiinnggss
                    898:              VI Insert Mode functions
                    899: 
                    900:              "C-D"  vi-eof-maybe
                    901:              "C-H"  backward-delete-char
                    902:              "C-I"  complete
                    903:              "C-J"  accept-line
                    904:              "C-M"  accept-line
                    905:              "C-R"  reverse-search-history
                    906:              "C-S"  forward-search-history
                    907:              "C-T"  transpose-chars
                    908:              "C-U"  unix-line-discard
                    909:              "C-V"  quoted-insert
                    910:              "C-W"  unix-word-rubout
                    911:              "C-Y"  yank
                    912:              "C-["  vi-movement-mode
                    913:              "C-_"  undo
                    914:              " " to "~"  self-insert
                    915:              "C-?"  backward-delete-char
                    916: 
                    917:              VI Command Mode functions
                    918: 
                    919:              "C-D"  vi-eof-maybe
                    920:              "C-E"  emacs-editing-mode
                    921:              "C-G"  abort
                    922:              "C-H"  backward-char
                    923:              "C-J"  accept-line
                    924:              "C-K"  kill-line
                    925:              "C-L"  clear-screen
                    926:              "C-M"  accept-line
                    927:              "C-N"  next-history
                    928:              "C-P"  previous-history
                    929:              "C-Q"  quoted-insert
                    930:              "C-R"  reverse-search-history
                    931:              "C-S"  forward-search-history
                    932:              "C-T"  transpose-chars
                    933:              "C-U"  unix-line-discard
                    934:              "C-V"  quoted-insert
                    935:              "C-W"  unix-word-rubout
                    936:              "C-Y"  yank
                    937:              "C-_"  vi-undo
                    938:              " "  forward-char
                    939:              "#"  insert-comment
                    940:              "$"  end-of-line
                    941:              "%"  vi-match
                    942:              "&"  vi-tilde-expand
                    943:              "*"  vi-complete
                    944:              "+"  next-history
                    945:              ","  vi-char-search
                    946:              "-"  previous-history
                    947:              "."  vi-redo
                    948:              "/"  vi-search
                    949:              "0"  beginning-of-line
                    950:              "1" to "9"  vi-arg-digit
                    951:              ";"  vi-char-search
                    952:              "="  vi-complete
                    953:              "?"  vi-search
                    954:              "A"  vi-append-eol
                    955:              "B"  vi-prev-word
                    956:              "C"  vi-change-to
                    957:              "D"  vi-delete-to
                    958:              "E"  vi-end-word
                    959:              "F"  vi-char-search
                    960:              "G"  vi-fetch-history
                    961:              "I"  vi-insert-beg
                    962:              "N"  vi-search-again
                    963:              "P"  vi-put
                    964:              "R"  vi-replace
                    965:              "S"  vi-subst
                    966:              "T"  vi-char-search
                    967:              "U"  revert-line
                    968:              "W"  vi-next-word
                    969:              "X"  backward-delete-char
                    970:              "Y"  vi-yank-to
                    971:              "\"  vi-complete
                    972:              "^"  vi-first-print
                    973:              "_"  vi-yank-arg
                    974:              "`"  vi-goto-mark
                    975:              "a"  vi-append-mode
                    976:              "b"  vi-prev-word
                    977:              "c"  vi-change-to
                    978:              "d"  vi-delete-to
                    979:              "e"  vi-end-word
                    980:              "f"  vi-char-search
                    981:              "h"  backward-char
                    982:              "i"  vi-insertion-mode
                    983:              "j"  next-history
                    984:              "k"  prev-history
                    985:              "l"  forward-char
                    986:              "m"  vi-set-mark
                    987:              "n"  vi-search-again
                    988:              "p"  vi-put
                    989:              "r"  vi-change-char
                    990:              "s"  vi-subst
                    991:              "t"  vi-char-search
                    992:              "u"  vi-undo
                    993:              "w"  vi-next-word
                    994:              "x"  vi-delete
                    995:              "y"  vi-yank-to
                    996:              "|"  vi-column
                    997:              "~"  vi-change-case
                    998: 
                    999: SSEEEE AALLSSOO
                   1000:        _T_h_e _G_n_u _R_e_a_d_l_i_n_e _L_i_b_r_a_r_y, Brian Fox and Chet Ramey
                   1001:        _T_h_e _G_n_u _H_i_s_t_o_r_y _L_i_b_r_a_r_y, Brian Fox and Chet Ramey
                   1002:        _b_a_s_h(1)
                   1003: 
                   1004: FFIILLEESS
                   1005:        _~_/_._i_n_p_u_t_r_c
                   1006:               Individual rreeaaddlliinnee initialization file
                   1007: 
                   1008: AAUUTTHHOORRSS
                   1009:        Brian Fox, Free Software Foundation
                   1010:        bfox@gnu.org
                   1011: 
                   1012:        Chet Ramey, Case Western Reserve University
                   1013:        chet.ramey@case.edu
                   1014: 
                   1015: BBUUGG RREEPPOORRTTSS
                   1016:        If you find a bug in rreeaaddlliinnee,, you should report it.   But  first,  you
                   1017:        should  make  sure  that it really is a bug, and that it appears in the
                   1018:        latest version of the rreeaaddlliinnee library that you have.
                   1019: 
                   1020:        Once you have determined that a bug actually exists, mail a bug  report
                   1021:        to  _b_u_g_-_r_e_a_d_l_i_n_e@_g_n_u_._o_r_g.   If  you have a fix, you are welcome to mail
                   1022:        that as well!  Suggestions  and  `philosophical'  bug  reports  may  be
                   1023:        mailed  to  _b_u_g_-_r_e_a_d_l_i_n_e@_g_n_u_._o_r_g  or  posted  to  the  Usenet newsgroup
                   1024:        ggnnuu..bbaasshh..bbuugg.
                   1025: 
                   1026:        Comments and bug reports concerning this manual page should be directed
                   1027:        to _c_h_e_t_._r_a_m_e_y_@_c_a_s_e_._e_d_u.
                   1028: 
                   1029: BBUUGGSS
                   1030:        It's too big and too slow.
                   1031: 
                   1032: 
                   1033: 
                   1034: GNU Readline 6.3                2014 January 6                     READLINE(3)

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>