]> git.ipfire.org Git - thirdparty/readline.git/commitdiff
fix leaks on signals for non-incremental searches; fix leaks in new readstr interface
authorChet Ramey <chet.ramey@case.edu>
Sat, 27 Jan 2024 21:29:47 +0000 (16:29 -0500)
committerChet Ramey <chet.ramey@case.edu>
Sat, 27 Jan 2024 21:29:47 +0000 (16:29 -0500)
15 files changed:
callback.c
complete.c
doc/Makefile.in
doc/history.0
doc/history.3
doc/hsuser.texi
doc/readline.0
doc/readline.3
doc/rluser.texi
doc/version.texi
readline.h
rlprivate.h
search.c
signals.c
text.c

index d78a7ca77c5078c39cf9617ddcc45eca68e63298..d376f948f60d9d80cd9b5332b7cf5f5c0ec525f9 100644 (file)
@@ -363,7 +363,7 @@ rl_callback_sigcleanup (void)
   if (RL_ISSTATE (RL_STATE_ISEARCH))
     _rl_isearch_cleanup (_rl_iscxt, 0);
   else if (RL_ISSTATE (RL_STATE_NSEARCH))
-    _rl_nsearch_cleanup (_rl_nscxt, 0);
+    _rl_nsearch_sigcleanup (_rl_nscxt, 0);
   else if (RL_ISSTATE (RL_STATE_VIMOTION))
     RL_UNSETSTATE (RL_STATE_VIMOTION);
   else if (RL_ISSTATE (RL_STATE_NUMERICARG))
@@ -373,6 +373,9 @@ rl_callback_sigcleanup (void)
     }
   else if (RL_ISSTATE (RL_STATE_MULTIKEY))
     RL_UNSETSTATE (RL_STATE_MULTIKEY);
+  else if (RL_ISSTATE (RL_STATE_READSTR))
+    _rl_readstr_sigcleanup (_rl_rscxt, 0);
+
   if (RL_ISSTATE (RL_STATE_CHARSEARCH))
     RL_UNSETSTATE (RL_STATE_CHARSEARCH);
 
index 79e37ccc75ffa32b21093193f80cba0a22e308a9..d0165cc733fd539ed0444c820ccd1d77b7baf642 100644 (file)
@@ -1355,6 +1355,7 @@ compute_lcd_of_matches (char **match_list, int matches, const char *text)
   int low;             /* Count of max-matched characters. */
   int lx;
   char *dtext;         /* dequoted TEXT, if needed */
+  size_t len1, len2;
 #if defined (HANDLE_MULTIBYTE)
   int v;
   size_t v1, v2;
@@ -1381,6 +1382,9 @@ compute_lcd_of_matches (char **match_list, int matches, const char *text)
          memset (&ps2, 0, sizeof (mbstate_t));
        }
 #endif
+      len1 = strlen (match_list[i]);
+      len2 = strlen (match_list[i + 1]);
+
       for (si = 0; (c1 = match_list[i][si]) && (c2 = match_list[i + 1][si]); si++)
        {
            if (_rl_completion_case_fold)
@@ -1391,8 +1395,8 @@ compute_lcd_of_matches (char **match_list, int matches, const char *text)
 #if defined (HANDLE_MULTIBYTE)
            if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
              {
-               v1 = MBRTOWC (&wc1, match_list[i]+si, strlen (match_list[i]+si), &ps1);
-               v2 = MBRTOWC (&wc2, match_list[i+1]+si, strlen (match_list[i+1]+si), &ps2);
+               v1 = MBRTOWC (&wc1, match_list[i]+si, len1 - si, &ps1);
+               v2 = MBRTOWC (&wc2, match_list[i+1]+si, len2 - si, &ps2);
                if (MB_INVALIDCH (v1) || MB_INVALIDCH (v2))
                  {
                    if (c1 != c2)       /* do byte comparison */
index 20a36184f7508a9cc114275cf211eef3be042788..a6640cb8a82dea973907414fb0607f76fcb35cc9 100644 (file)
@@ -73,7 +73,7 @@ HISTSRC = $(srcdir)/history.texi $(srcdir)/hsuser.texi \
          $(srcdir)/hstech.texi $(srcdir)/version.texi $(srcdir)/fdl.texi
 
 # This should be a program that converts troff to an ascii-readable format
-NROFF       = groff -Tascii
+NROFF       = groff -Tascii -P -c
 
 # This should be a program that converts troff to postscript
 GROFF       = groff
index 2bf3b1af77d2d3570b607967a0abd1c33bbc2eec..f5eb44fa035a801376ee7d86da7309604934b25d 100644 (file)
@@ -2,22 +2,22 @@ HISTORY(3)                 Library Functions Manual                 HISTORY(3)
 
 
 
-\e[1mNAME\e[0m
+N\bNA\bAM\bME\bE
        history - GNU History Library
 
-\e[1mCOPYRIGHT\e[0m
-       The GNU History Library is Copyright (C) 1989-2020 by the Free Software
+C\bCO\bOP\bPY\bYR\bRI\bIG\bGH\bHT\bT
+       The GNU History Library is Copyright (C) 1989-2024 by the Free Software
        Foundation, Inc.
 
-\e[1mDESCRIPTION\e[0m
+D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
        Many programs read input from the user a line at a time.  The GNU  His-
        tory  library is able to keep track of those lines, associate arbitrary
        data with each line, and utilize information  from  previous  lines  in
        composing new ones.
 
-\e[1mHISTORY EXPANSION\e[0m
+H\bHI\bIS\bST\bTO\bOR\bRY\bY E\bEX\bXP\bPA\bAN\bNS\bSI\bIO\bON\bN
        The  history library supports a history expansion feature that is iden-
-       tical to the history expansion in \e[1mbash.  \e[22mThis  section  describes  what
+       tical to the history expansion in b\bba\bas\bsh\bh.\b.  This  section  describes  what
        syntax features are available.
 
        History expansions introduce words from the history list into the input
@@ -29,112 +29,122 @@ HISTORY(3)                 Library Functions Manual                 HISTORY(3)
        line  is read.  It takes place in two parts.  The first is to determine
        which line from the history list to use during substitution.  The  sec-
        ond  is  to select portions of that line for inclusion into the current
-       one.  The line selected from the history is the \e[4mevent\e[24m, and the portions
-       of  that  line  that  are  acted upon are \e[4mwords\e[24m.  Various \e[4mmodifiers\e[24m are
+       one.  The line selected from the history is the _\be_\bv_\be_\bn_\bt, and the portions
+       of  that  line  that  are  acted upon are _\bw_\bo_\br_\bd_\bs.  Various _\bm_\bo_\bd_\bi_\bf_\bi_\be_\br_\bs are
        available to manipulate the selected words.  The line  is  broken  into
-       words in the same fashion as \e[1mbash \e[22mdoes when reading input, so that sev-
+       words in the same fashion as b\bba\bas\bsh\bdoes when reading input, so that sev-
        eral words that would otherwise be separated are  considered  one  word
-       when  surrounded  by  quotes (see the description of \e[1mhistory_tokenize()\e[0m
-       below).  History expansions are introduced by  the  appearance  of  the
-       history expansion character, which is \e[1m! \e[22mby default.  Only backslash (\e[1m\\e[22m)
-       and single quotes can quote the history expansion character.
-
-   \e[1mEvent Designators\e[0m
+       when  surrounded  by  quotes (see the description of h\bhi\bis\bst\bto\bor\bry\by_\b_t\bto\bok\bke\ben\bni\biz\bze\be(\b()\b)
+       below).
+
+       History expansions are introduced by the appearance of the history  ex-
+       pansion  character, which is !\b! by default.  Only backslash (\\b\) and sin-
+       gle quotes can quote the history expansion character.
+
+       There is a special abbreviation for substitution, active when the _\bq_\bu_\bi_\bc_\bk
+       _\bs_\bu_\bb_\bs_\bt_\bi_\bt_\bu_\bt_\bi_\bo_\bn  character (default ^\b^) is the first character on the line.
+       It selects the previous history list entry, using an  event  designator
+       equivalent  to !\b!!\b!, and substitutes one string for another in that line.
+       It is described below under E\bEv\bve\ben\bnt\bt D\bDe\bes\bsi\big\bgn\bna\bat\bto\bor\brs\bs.  This is the  only  his-
+       tory  expansion  that does not begin with the history expansion charac-
+       ter.
+
+   E\bEv\bve\ben\bnt\bt D\bDe\bes\bsi\big\bgn\bna\bat\bto\bor\brs\bs
        An event designator is a reference to a command line entry in the  his-
        tory  list.   Unless  the reference is absolute, events are relative to
        the current position in the history list.
 
-       \e[1m!      \e[22mStart a history substitution, except when followed by  a  \e[1mblank\e[22m,
+       !\b!      Start a history substitution, except when followed by  a  b\bbl\bla\ban\bnk\bk,
               newline, = or (.
-       \e[1m!\e[4m\e[22mn\e[24m     Refer to command line \e[4mn\e[24m.
-       \e[1m!-\e[4m\e[22mn\e[24m    Refer to the current command minus \e[4mn\e[24m.
-       \e[1m!!     \e[22mRefer to the previous command.  This is a synonym for `!-1'.
-       \e[1m!\e[4m\e[22mstring\e[0m
+       !\b!_\bn     Refer to command line _\bn.
+       !\b!-\b-_\bn    Refer to the current command minus _\bn.
+       !\b!!\b!     Refer to the previous command.  This is a synonym for `!-1'.
+       !\b!_\bs_\bt_\br_\bi_\bn_\bg
               Refer  to the most recent command preceding the current position
-              in the history list starting with \e[4mstring\e[24m.
-       \e[1m!?\e[4m\e[22mstring\e[24m\e[1m[?]\e[0m
+              in the history list starting with _\bs_\bt_\br_\bi_\bn_\bg.
+       !\b!?\b?_\bs_\bt_\br_\bi_\bn_\bg[\b[?\b?]\b]
               Refer to the most recent command preceding the current  position
-              in  the  history  list containing \e[4mstring\e[24m.  The trailing \e[1m? \e[22mmay be
-              omitted if \e[4mstring\e[24m is followed  immediately  by  a  newline.   If
-              \e[4mstring\e[24m  is  missing,  the  string from the most recent search is
+              in  the  history  list containing _\bs_\bt_\br_\bi_\bn_\bg.  The trailing ?\bmay be
+              omitted if _\bs_\bt_\br_\bi_\bn_\bg is followed  immediately  by  a  newline.   If
+              _\bs_\bt_\br_\bi_\bn_\bg  is  missing,  the  string from the most recent search is
               used; it is an error if there is no previous search string.
-       \e[1m^\e[4m\e[22mstring1\e[24m\e[1m^\e[4m\e[22mstring2\e[24m\e[1m^\e[0m
-              Quick substitution.  Repeat the last command, replacing  \e[4mstring1\e[0m
-              with \e[4mstring2\e[24m.  Equivalent to ``!!:s^\e[4mstring1\e[24m^\e[4mstring2\e[24m^'' (see \e[1mMod-\e[0m
-              \e[1mifiers \e[22mbelow).
-       \e[1m!#     \e[22mThe entire command line typed so far.
-
-   \e[1mWord Designators\e[0m
-       Word designators are used to select desired words from the event.  A  \e[1m:\e[0m
+       ^\b^_\bs_\bt_\br_\bi_\bn_\bg_\b1^\b^_\bs_\bt_\br_\bi_\bn_\bg_\b2^\b^
+              Quick substitution.  Repeat the last command, replacing  _\bs_\bt_\br_\bi_\bn_\bg_\b1
+              with  _\bs_\bt_\br_\bi_\bn_\bg_\b2.  Equivalent to "!!:s^_\bs_\bt_\br_\bi_\bn_\bg_\b1^_\bs_\bt_\br_\bi_\bn_\bg_\b2^" (see M\bMo\bod\bdi\bi-\b-
+              f\bfi\bie\ber\brs\bbelow).
+       !\b!#\b#     The entire command line typed so far.
+
+   W\bWo\bor\brd\bd D\bDe\bes\bsi\big\bgn\bna\bat\bto\bor\brs\bs
+       Word designators are used to select desired words from the event.  A  :\b:
        separates  the event specification from the word designator.  It may be
-       omitted if the word designator begins with a \e[1m^\e[22m, \e[1m$\e[22m, \e[1m*\e[22m, \e[1m-\e[22m, or  \e[1m%\e[22m.   Words
+       omitted if the word designator begins with a ^\b^, $\b$, *\b*, -\b-, or  %\b%.   Words
        are  numbered from the beginning of the line, with the first word being
        denoted by 0 (zero).  Words are inserted into the  current  line  sepa-
        rated by single spaces.
 
-       \e[1m0 (zero)\e[0m
+       0\b0 (\b(z\bze\ber\bro\bo)\b)
               The zeroth word.  For the shell, this is the command word.
-       \e[4mn\e[24m      The \e[4mn\e[24mth word.
-       \e[1m^      \e[22mThe first argument.  That is, word 1.
-       \e[1m$      \e[22mThe  last word.  This is usually the last argument, but will ex-
+       _\bn      The _\bnth word.
+       ^\b^      The first argument.  That is, word 1.
+       $\b$      The  last word.  This is usually the last argument, but will ex-
               pand to the zeroth word if there is only one word in the line.
-       \e[1m%      \e[22mThe first word matched by the most recent `?\e[4mstring\e[24m?' search,  if
+       %\b%      The first word matched by the most recent `?_\bs_\bt_\br_\bi_\bn_\bg?' search,  if
               the  search  string  begins  with  a character that is part of a
               word.
-       \e[4mx\e[24m\e[1m-\e[4m\e[22my\e[24m    A range of words; `-\e[4my\e[24m' abbreviates `0-\e[4my\e[24m'.
-       \e[1m*      \e[22mAll of the words but the zeroth.  This is a synonym  for  `\e[4m1-$\e[24m'.
-              It  is  not  an  error to use \e[1m* \e[22mif there is just one word in the
+       _\bx-\b-_\by    A range of words; `-_\by' abbreviates `0-_\by'.
+       *\b*      All of the words but the zeroth.  This is a synonym  for  `_\b1_\b-_\b$'.
+              It  is  not  an  error to use *\bif there is just one word in the
               event; the empty string is returned in that case.
-       \e[1mx*     \e[22mAbbreviates \e[4mx-$\e[24m.
-       \e[1mx-     \e[22mAbbreviates \e[4mx-$\e[24m like \e[1mx*\e[22m, but omits the last word.  If \e[1mx \e[22mis miss-
+       x\bx*\b*     Abbreviates _\bx_\b-_\b$.
+       x\bx-\b-     Abbreviates _\bx_\b-_\b$ like x\bx*\b*, but omits the last word.  If x\bis miss-
               ing, it defaults to 0.
 
        If  a  word  designator is supplied without an event specification, the
        previous command is used as the event.
 
-   \e[1mModifiers\e[0m
+   M\bMo\bod\bdi\bif\bfi\bie\ber\brs\bs
        After the optional word designator, there may appear a sequence of  one
        or more of the following modifiers, each preceded by a `:'.  These mod-
        ify, or edit, the word or words selected from the history event.
 
-       \e[1mh      \e[22mRemove a trailing file name component, leaving only the head.
-       \e[1mt      \e[22mRemove all leading file name components, leaving the tail.
-       \e[1mr      \e[22mRemove a trailing suffix of the form \e[4m.xxx\e[24m, leaving the basename.
-       \e[1me      \e[22mRemove all but the trailing suffix.
-       \e[1mp      \e[22mPrint the new command but do not execute it.
-       \e[1mq      \e[22mQuote the substituted words, escaping further substitutions.
-       \e[1mx      \e[22mQuote the substituted words as with \e[1mq\e[22m, but break into  words  at
-              \e[1mblanks  \e[22mand newlines.  The \e[1mq \e[22mand \e[1mx \e[22mmodifiers are mutually exclu-
+       h\bh      Remove a trailing file name component, leaving only the head.
+       t\bt      Remove all leading file name components, leaving the tail.
+       r\br      Remove a trailing suffix of the form _\b._\bx_\bx_\bx, leaving the basename.
+       e\be      Remove all but the trailing suffix.
+       p\bp      Print the new command but do not execute it.
+       q\bq      Quote the substituted words, escaping further substitutions.
+       x\bx      Quote the substituted words as with q\bq, but break into  words  at
+              b\bbl\bla\ban\bnk\bks\bs  and newlines.  The q\bq and x\bmodifiers are mutually exclu-
               sive; the last one supplied is used.
-       \e[1ms/\e[4m\e[22mold\e[24m\e[1m/\e[4m\e[22mnew\e[24m\e[1m/\e[0m
-              Substitute \e[4mnew\e[24m for the first occurrence  of  \e[4mold\e[24m  in  the  event
+       s\bs/\b/_\bo_\bl_\bd/\b/_\bn_\be_\bw/\b/
+              Substitute _\bn_\be_\bw for the first occurrence  of  _\bo_\bl_\bd  in  the  event
               line.  Any character may be used as the delimiter in place of /.
               The final delimiter is optional if it is the last  character  of
-              the event line.  The delimiter may be quoted in \e[4mold\e[24m and \e[4mnew\e[24m with
-              a single backslash.  If & appears in \e[4mnew\e[24m, it is replaced by \e[4mold\e[24m.
-              A  single backslash will quote the &.  If \e[4mold\e[24m is null, it is set
-              to the last \e[4mold\e[24m substituted, or, if no previous history  substi-
-              tutions  took  place,  the last \e[4mstring\e[24m in a \e[1m!?\e[4m\e[22mstring\e[24m\e[1m[?]  \e[22msearch.
-              If \e[4mnew\e[24m is null, each matching \e[4mold\e[24m is deleted.
-       \e[1m&      \e[22mRepeat the previous substitution.
-       \e[1mg      \e[22mCause changes to be applied over the entire event line.  This is
-              used  in  conjunction  with `\e[1m:s\e[22m' (e.g., `\e[1m:gs/\e[4m\e[22mold\e[24m\e[1m/\e[4m\e[22mnew\e[24m\e[1m/\e[22m') or `\e[1m:&\e[22m'.
-              If used with `\e[1m:s\e[22m', any delimiter can be used in place of /,  and
+              the event line.  The delimiter may be quoted in _\bo_\bl_\bd and _\bn_\be_\bw with
+              a single backslash.  If & appears in _\bn_\be_\bw, it is replaced by _\bo_\bl_\bd.
+              A  single backslash will quote the &.  If _\bo_\bl_\bd is null, it is set
+              to the last _\bo_\bl_\bd substituted, or, if no previous history  substi-
+              tutions  took  place,  the last _\bs_\bt_\br_\bi_\bn_\bg in a !\b!?\b?_\bs_\bt_\br_\bi_\bn_\bg[\b[?\b?]\b]  search.
+              If _\bn_\be_\bw is null, each matching _\bo_\bl_\bd is deleted.
+       &\b&      Repeat the previous substitution.
+       g\bg      Cause changes to be applied over the entire event line.  This is
+              used  in  conjunction  with `:\b:s\bs' (e.g., `:\b:g\bgs\bs/\b/_\bo_\bl_\bd/\b/_\bn_\be_\bw/\b/') or `:\b:&\b&'.
+              If used with `:\b:s\bs', any delimiter can be used in place of /,  and
               the  final  delimiter is optional if it is the last character of
-              the event line.  An \e[1ma \e[22mmay be used as a synonym for \e[1mg\e[22m.
-       \e[1mG      \e[22mApply the following `\e[1ms\e[22m' or `\e[1m&\e[22m' modifier once to each word in the
+              the event line.  An a\ba may be used as a synonym for g\bg.
+       G\bG      Apply the following `s\bs' or `&\b&' modifier once to each word in the
               event line.
 
-\e[1mPROGRAMMING WITH HISTORY FUNCTIONS\e[0m
+P\bPR\bRO\bOG\bGR\bRA\bAM\bMM\bMI\bIN\bNG\bG W\bWI\bIT\bTH\bH H\bHI\bIS\bST\bTO\bOR\bRY\bY F\bFU\bUN\bNC\bCT\bTI\bIO\bON\bNS\bS
        This  section  describes  how  to use the History library in other pro-
        grams.
 
-   \e[1mIntroduction to History\e[0m
+   I\bIn\bnt\btr\bro\bod\bdu\buc\bct\bti\bio\bon\bn t\bto\bo H\bHi\bis\bst\bto\bor\bry\by
        A programmer using the History library has available functions for  re-
        membering  lines  on  a history list, associating arbitrary data with a
        line, removing lines from the list, searching through the  list  for  a
        line  containing  an arbitrary text string, and referencing any line in
-       the list directly.  In addition, a history \e[4mexpansion\e[24m function is avail-
+       the list directly.  In addition, a history _\be_\bx_\bp_\ba_\bn_\bs_\bi_\bo_\bn function is avail-
        able  which  provides  for a consistent user interface across different
        programs.
 
@@ -142,7 +152,7 @@ HISTORY(3)                 Library Functions Manual                 HISTORY(3)
        fit  of  a  consistent user interface with a set of well-known commands
        for manipulating the text of previous lines and using that text in  new
        commands.  The basic history manipulation commands are identical to the
-       history substitution provided by \e[1mbash\e[22m.
+       history substitution provided by b\bba\bas\bsh\bh.
 
        The programmer can also use the readline library, which  includes  some
        history manipulation by default, and has the added advantage of command
@@ -150,16 +160,16 @@ HISTORY(3)                 Library Functions Manual                 HISTORY(3)
 
        Before declaring any functions using any functionality the History  li-
        brary  provides in other code, an application writer should include the
-       file \e[4m<readline/history.h>\e[24m in any file that uses the  History  library's
+       file _\b<_\br_\be_\ba_\bd_\bl_\bi_\bn_\be_\b/_\bh_\bi_\bs_\bt_\bo_\br_\by_\b._\bh_\b> in any file that uses the  History  library's
        features.   It  supplies  extern  declarations for all of the library's
        public functions and variables, and declares all  of  the  public  data
        structures.
 
-   \e[1mHistory Storage\e[0m
+   H\bHi\bis\bst\bto\bor\bry\by S\bSt\bto\bor\bra\bag\bge\be
        The  history  list  is an array of history entries.  A history entry is
        declared as follows:
 
-       \e[4mtypedef\e[24m \e[4mvoid\e[24m \e[4m*\e[24m \e[1mhistdata_t;\e[0m
+       _\bt_\by_\bp_\be_\bd_\be_\bf _\bv_\bo_\bi_\bd _\b* h\bhi\bis\bst\btd\bda\bat\bta\ba_\b_t\bt;\b;
 
        typedef struct _hist_entry {
          char *line;
@@ -169,7 +179,7 @@ HISTORY(3)                 Library Functions Manual                 HISTORY(3)
 
        The history list itself might therefore be declared as
 
-       \e[4mHIST_ENTRY\e[24m \e[4m**\e[24m \e[1mthe_history_list;\e[0m
+       _\bH_\bI_\bS_\bT_\b__\bE_\bN_\bT_\bR_\bY _\b*_\b* t\bth\bhe\be_\b_h\bhi\bis\bst\bto\bor\bry\by_\b_l\bli\bis\bst\bt;\b;
 
        The state of the History library is encapsulated into a  single  struc-
        ture:
@@ -185,197 +195,197 @@ HISTORY(3)                 Library Functions Manual                 HISTORY(3)
          int flags;
        } HISTORY_STATE;
 
-       If the flags member includes \e[1mHS_STIFLED\e[22m, the history has been stifled.
+       If the flags member includes H\bHS\bS_\b_S\bST\bTI\bIF\bFL\bLE\bED\bD, the history has been stifled.
 
-\e[1mHistory Functions\e[0m
+H\bHi\bis\bst\bto\bor\bry\by F\bFu\bun\bnc\bct\bti\bio\bon\bns\bs
        This  section  describes the calling sequence for the various functions
        exported by the GNU History library.
 
-   \e[1mInitializing History and State Management\e[0m
+   I\bIn\bni\bit\bti\bia\bal\bli\biz\bzi\bin\bng\bg H\bHi\bis\bst\bto\bor\bry\by a\ban\bnd\bd S\bSt\bta\bat\bte\be M\bMa\ban\bna\bag\bge\bem\bme\ben\bnt\bt
        This section describes functions used  to  initialize  and  manage  the
        state of the History library when you want to use the history functions
        in your program.
 
-       \e[4mvoid\e[24m \e[1musing_history \e[22m(\e[4mvoid\e[24m)
+       _\bv_\bo_\bi_\bd u\bus\bsi\bin\bng\bg_\b_h\bhi\bis\bst\bto\bor\bry\by (_\bv_\bo_\bi_\bd)
        Begin a session in which the history functions  might  be  used.   This
        initializes the interactive variables.
 
-       \e[4mHISTORY_STATE\e[24m \e[4m*\e[24m \e[1mhistory_get_history_state \e[22m(\e[4mvoid\e[24m)
+       _\bH_\bI_\bS_\bT_\bO_\bR_\bY_\b__\bS_\bT_\bA_\bT_\bE _\b* h\bhi\bis\bst\bto\bor\bry\by_\b_g\bge\bet\bt_\b_h\bhi\bis\bst\bto\bor\bry\by_\b_s\bst\bta\bat\bte\be (_\bv_\bo_\bi_\bd)
        Return a structure describing the current state of the input history.
 
-       \e[4mvoid\e[24m \e[1mhistory_set_history_state \e[22m(\e[4mHISTORY_STATE\e[24m \e[4m*state\e[24m)
-       Set the state of the history list according to \e[4mstate\e[24m.
+       _\bv_\bo_\bi_\bd h\bhi\bis\bst\bto\bor\bry\by_\b_s\bse\bet\bt_\b_h\bhi\bis\bst\bto\bor\bry\by_\b_s\bst\bta\bat\bte\be (_\bH_\bI_\bS_\bT_\bO_\bR_\bY_\b__\bS_\bT_\bA_\bT_\bE _\b*_\bs_\bt_\ba_\bt_\be)
+       Set the state of the history list according to _\bs_\bt_\ba_\bt_\be.
 
 
-   \e[1mHistory List Management\e[0m
+   H\bHi\bis\bst\bto\bor\bry\by L\bLi\bis\bst\bt M\bMa\ban\bna\bag\bge\bem\bme\ben\bnt\bt
        These  functions  manage individual entries on the history list, or set
        parameters managing the list itself.
 
-       \e[4mvoid\e[24m \e[1madd_history \e[22m(\e[4mconst\e[24m \e[4mchar\e[24m \e[4m*string\e[24m)
-       Place \e[4mstring\e[24m at the end of the history list.  The associated data field
-       (if  any) is set to \e[1mNULL\e[22m.  If the maximum number of history entries has
-       been set using \e[1mstifle_history()\e[22m, and the new number of history  entries
+       _\bv_\bo_\bi_\bd a\bad\bdd\bd_\b_h\bhi\bis\bst\bto\bor\bry\by (_\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bs_\bt_\br_\bi_\bn_\bg)
+       Place _\bs_\bt_\br_\bi_\bn_\bg at the end of the history list.  The associated data field
+       (if  any) is set to N\bNU\bUL\bLL\bL.  If the maximum number of history entries has
+       been set using s\bst\bti\bif\bfl\ble\be_\b_h\bhi\bis\bst\bto\bor\bry\by(\b()\b), and the new number of history  entries
        would exceed that maximum, the oldest history entry is removed.
 
-       \e[4mvoid\e[24m \e[1madd_history_time \e[22m(\e[4mconst\e[24m \e[4mchar\e[24m \e[4m*string\e[24m)
+       _\bv_\bo_\bi_\bd a\bad\bdd\bd_\b_h\bhi\bis\bst\bto\bor\bry\by_\b_t\bti\bim\bme\be (_\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bs_\bt_\br_\bi_\bn_\bg)
        Change  the time stamp associated with the most recent history entry to
-       \e[4mstring\e[24m.
+       _\bs_\bt_\br_\bi_\bn_\bg.
 
-       \e[4mHIST_ENTRY\e[24m \e[4m*\e[24m \e[1mremove_history \e[22m(\e[4mint\e[24m \e[4mwhich\e[24m)
-       Remove history entry at offset \e[4mwhich\e[24m from the history.  The removed el-
+       _\bH_\bI_\bS_\bT_\b__\bE_\bN_\bT_\bR_\bY _\b* r\bre\bem\bmo\bov\bve\be_\b_h\bhi\bis\bst\bto\bor\bry\by (_\bi_\bn_\bt _\bw_\bh_\bi_\bc_\bh)
+       Remove history entry at offset _\bw_\bh_\bi_\bc_\bh from the history.  The removed el-
        ement is returned so you can free the line, data, and containing struc-
        ture.
 
-       \e[4mhistdata_t\e[24m \e[1mfree_history_entry \e[22m(\e[4mHIST_ENTRY\e[24m \e[4m*histent\e[24m)
-       Free the history entry \e[4mhistent\e[24m and any history library private data as-
+       _\bh_\bi_\bs_\bt_\bd_\ba_\bt_\ba_\b__\bt f\bfr\bre\bee\be_\b_h\bhi\bis\bst\bto\bor\bry\by_\b_e\ben\bnt\btr\bry\by (_\bH_\bI_\bS_\bT_\b__\bE_\bN_\bT_\bR_\bY _\b*_\bh_\bi_\bs_\bt_\be_\bn_\bt)
+       Free the history entry _\bh_\bi_\bs_\bt_\be_\bn_\bt and any history library private data as-
        sociated  with it.  Returns the application-specific data so the caller
        can dispose of it.
 
-       \e[4mHIST_ENTRY\e[24m \e[4m*\e[24m \e[1mreplace_history_entry \e[22m(\e[4mint\e[24m \e[4mwhich,\e[24m \e[4mconst\e[24m \e[4mchar\e[24m \e[4m*line,\e[24m  \e[4mhist-\e[0m
-       \e[4mdata_t\e[24m \e[4mdata\e[24m)
-       Make  the  history  entry at offset \e[4mwhich\e[24m have \e[4mline\e[24m and \e[4mdata\e[24m.  This re-
+       _\bH_\bI_\bS_\bT_\b__\bE_\bN_\bT_\bR_\bY _\b* r\bre\bep\bpl\bla\bac\bce\be_\b_h\bhi\bis\bst\bto\bor\bry\by_\b_e\ben\bnt\btr\bry\by (_\bi_\bn_\bt _\bw_\bh_\bi_\bc_\bh_\b, _\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bl_\bi_\bn_\be_\b,  _\bh_\bi_\bs_\bt_\b-
+       _\bd_\ba_\bt_\ba_\b__\bt _\bd_\ba_\bt_\ba)
+       Make  the  history  entry at offset _\bw_\bh_\bi_\bc_\bh have _\bl_\bi_\bn_\be and _\bd_\ba_\bt_\ba.  This re-
        turns the old entry so the caller can dispose of  any  application-spe-
-       cific  data.   In  the  case of an invalid \e[4mwhich\e[24m, a \e[1mNULL \e[22mpointer is re-
+       cific  data.   In  the  case of an invalid _\bw_\bh_\bi_\bc_\bh, a N\bNU\bUL\bLL\bpointer is re-
        turned.
 
-       \e[4mvoid\e[24m \e[1mclear_history \e[22m(\e[4mvoid\e[24m)
+       _\bv_\bo_\bi_\bd c\bcl\ble\bea\bar\br_\b_h\bhi\bis\bst\bto\bor\bry\by (_\bv_\bo_\bi_\bd)
        Clear the history list by deleting all the entries.
 
-       \e[4mvoid\e[24m \e[1mstifle_history \e[22m(\e[4mint\e[24m \e[4mmax\e[24m)
-       Stifle the history list, remembering only the last  \e[4mmax\e[24m  entries.   The
-       history list will contain only \e[4mmax\e[24m entries at a time.
+       _\bv_\bo_\bi_\bd s\bst\bti\bif\bfl\ble\be_\b_h\bhi\bis\bst\bto\bor\bry\by (_\bi_\bn_\bt _\bm_\ba_\bx)
+       Stifle the history list, remembering only the last  _\bm_\ba_\bx  entries.   The
+       history list will contain only _\bm_\ba_\bx entries at a time.
 
-       \e[4mint\e[24m \e[1munstifle_history \e[22m(\e[4mvoid\e[24m)
+       _\bi_\bn_\bt u\bun\bns\bst\bti\bif\bfl\ble\be_\b_h\bhi\bis\bst\bto\bor\bry\by (_\bv_\bo_\bi_\bd)
        Stop  stifling  the  history.   This returns the previously-set maximum
-       number of history entries (as set by  \e[1mstifle_history()\e[22m).   history  was
+       number of history entries (as set by  s\bst\bti\bif\bfl\ble\be_\b_h\bhi\bis\bst\bto\bor\bry\by(\b()\b)).   history  was
        stifled.  The value is positive if the history was stifled, negative if
        it wasn't.
 
-       \e[4mint\e[24m \e[1mhistory_is_stifled \e[22m(\e[4mvoid\e[24m)
+       _\bi_\bn_\bt h\bhi\bis\bst\bto\bor\bry\by_\b_i\bis\bs_\b_s\bst\bti\bif\bfl\ble\bed\bd (_\bv_\bo_\bi_\bd)
        Returns non-zero if the history is stifled, zero if it is not.
 
 
-   \e[1mInformation About the History List\e[0m
+   I\bIn\bnf\bfo\bor\brm\bma\bat\bti\bio\bon\bn A\bAb\bbo\bou\but\bt t\bth\bhe\be H\bHi\bis\bst\bto\bor\bry\by L\bLi\bis\bst\bt
        These functions return information about the entire history list or in-
        dividual list entries.
 
-       \e[4mHIST_ENTRY\e[24m \e[4m**\e[24m \e[1mhistory_list \e[22m(\e[4mvoid\e[24m)
-       Return a \e[1mNULL \e[22mterminated array of \e[4mHIST_ENTRY\e[24m \e[4m*\e[24m which is the current in-
+       _\bH_\bI_\bS_\bT_\b__\bE_\bN_\bT_\bR_\bY _\b*_\b* h\bhi\bis\bst\bto\bor\bry\by_\b_l\bli\bis\bst\bt (_\bv_\bo_\bi_\bd)
+       Return a N\bNU\bUL\bLL\bL terminated array of _\bH_\bI_\bS_\bT_\b__\bE_\bN_\bT_\bR_\bY _\b* which is the current in-
        put history.  Element 0 of this list is  the  beginning  of  time.   If
-       there is no history, return \e[1mNULL\e[22m.
+       there is no history, return N\bNU\bUL\bLL\bL.
 
-       \e[4mint\e[24m \e[1mwhere_history \e[22m(\e[4mvoid\e[24m)
+       _\bi_\bn_\bt w\bwh\bhe\ber\bre\be_\b_h\bhi\bis\bst\bto\bor\bry\by (_\bv_\bo_\bi_\bd)
        Returns the offset of the current history element.
 
-       \e[4mHIST_ENTRY\e[24m \e[4m*\e[24m \e[1mcurrent_history \e[22m(\e[4mvoid\e[24m)
+       _\bH_\bI_\bS_\bT_\b__\bE_\bN_\bT_\bR_\bY _\b* c\bcu\bur\brr\bre\ben\bnt\bt_\b_h\bhi\bis\bst\bto\bor\bry\by (_\bv_\bo_\bi_\bd)
        Return  the  history  entry  at  the current position, as determined by
-       \e[1mwhere_history()\e[22m.  If there is no entry there, return a \e[1mNULL \e[22mpointer.
+       w\bwh\bhe\ber\bre\be_\b_h\bhi\bis\bst\bto\bor\bry\by(\b()\b).  If there is no entry there, return a N\bNU\bUL\bLL\bpointer.
 
-       \e[4mHIST_ENTRY\e[24m \e[4m*\e[24m \e[1mhistory_get \e[22m(\e[4mint\e[24m \e[4moffset\e[24m)
-       Return the history entry at position \e[4moffset\e[24m.  The range of valid values
-       of  \e[4moffset\e[24m  starts  at \e[1mhistory_base \e[22mand ends at \e[1mhistory_length \e[22m- 1.  If
-       there is no entry there, or if \e[4moffset\e[24m is outside the valid  range,  re-
-       turn a \e[1mNULL \e[22mpointer.
+       _\bH_\bI_\bS_\bT_\b__\bE_\bN_\bT_\bR_\bY _\b* h\bhi\bis\bst\bto\bor\bry\by_\b_g\bge\bet\bt (_\bi_\bn_\bt _\bo_\bf_\bf_\bs_\be_\bt)
+       Return the history entry at position _\bo_\bf_\bf_\bs_\be_\bt.  The range of valid values
+       of  _\bo_\bf_\bf_\bs_\be_\bt  starts  at h\bhi\bis\bst\bto\bor\bry\by_\b_b\bba\bas\bse\be and ends at h\bhi\bis\bst\bto\bor\bry\by_\b_l\ble\ben\bng\bgt\bth\b- 1.  If
+       there is no entry there, or if _\bo_\bf_\bf_\bs_\be_\bt is outside the valid  range,  re-
+       turn a N\bNU\bUL\bLL\bpointer.
 
-       \e[4mtime_t\e[24m \e[1mhistory_get_time \e[22m(\e[4mHIST_ENTRY\e[24m \e[4m*\e[24m)
+       _\bt_\bi_\bm_\be_\b__\bt h\bhi\bis\bst\bto\bor\bry\by_\b_g\bge\bet\bt_\b_t\bti\bim\bme\be (_\bH_\bI_\bS_\bT_\b__\bE_\bN_\bT_\bR_\bY _\b*)
        Return  the  time stamp associated with the history entry passed as the
        argument.
 
-       \e[4mint\e[24m \e[1mhistory_total_bytes \e[22m(\e[4mvoid\e[24m)
+       _\bi_\bn_\bt h\bhi\bis\bst\bto\bor\bry\by_\b_t\bto\bot\bta\bal\bl_\b_b\bby\byt\bte\bes\bs (_\bv_\bo_\bi_\bd)
        Return the number of bytes that the primary history entries are  using.
        This  function  returns  the sum of the lengths of all the lines in the
        history.
 
 
-   \e[1mMoving Around the History List\e[0m
+   M\bMo\bov\bvi\bin\bng\bg A\bAr\bro\bou\bun\bnd\bd t\bth\bhe\be H\bHi\bis\bst\bto\bor\bry\by L\bLi\bis\bst\bt
        These functions allow the current index into the history list to be set
        or changed.
 
-       \e[4mint\e[24m \e[1mhistory_set_pos \e[22m(\e[4mint\e[24m \e[4mpos\e[24m)
-       Set the current history offset to \e[4mpos\e[24m, an absolute index into the list.
-       Returns 1 on success, 0 if \e[4mpos\e[24m is less than zero or  greater  than  the
+       _\bi_\bn_\bt h\bhi\bis\bst\bto\bor\bry\by_\b_s\bse\bet\bt_\b_p\bpo\bos\bs (_\bi_\bn_\bt _\bp_\bo_\bs)
+       Set the current history offset to _\bp_\bo_\bs, an absolute index into the list.
+       Returns 1 on success, 0 if _\bp_\bo_\bs is less than zero or  greater  than  the
        number of history entries.
 
-       \e[4mHIST_ENTRY\e[24m \e[4m*\e[24m \e[1mprevious_history \e[22m(\e[4mvoid\e[24m)
+       _\bH_\bI_\bS_\bT_\b__\bE_\bN_\bT_\bR_\bY _\b* p\bpr\bre\bev\bvi\bio\bou\bus\bs_\b_h\bhi\bis\bst\bto\bor\bry\by (_\bv_\bo_\bi_\bd)
        Back  up  the current history offset to the previous history entry, and
        return a pointer to that entry.  If there is no previous entry,  return
-       a \e[1mNULL \e[22mpointer.
+       a N\bNU\bUL\bLL\bpointer.
 
-       \e[4mHIST_ENTRY\e[24m \e[4m*\e[24m \e[1mnext_history \e[22m(\e[4mvoid\e[24m)
+       _\bH_\bI_\bS_\bT_\b__\bE_\bN_\bT_\bR_\bY _\b* n\bne\bex\bxt\bt_\b_h\bhi\bis\bst\bto\bor\bry\by (_\bv_\bo_\bi_\bd)
        If  the  current history offset refers to a valid history entry, incre-
        ment the current history offset.  If the  possibly-incremented  history
        offset refers to a valid history entry, return a pointer to that entry;
-       otherwise, return a \e[1mNULL \e[22mpointer.
+       otherwise, return a N\bNU\bUL\bLL\bpointer.
 
 
-   \e[1mSearching the History List\e[0m
+   S\bSe\bea\bar\brc\bch\bhi\bin\bng\bg t\bth\bhe\be H\bHi\bis\bst\bto\bor\bry\by L\bLi\bis\bst\bt
        These functions allow searching of the history list  for  entries  con-
        taining a specific string.  Searching may be performed both forward and
-       backward from the current history position.   The  search  may  be  \e[4man-\e[0m
-       \e[4mchored\e[24m, meaning that the string must match at the beginning of the his-
+       backward from the current history position.   The  search  may  be  _\ba_\bn_\b-
+       _\bc_\bh_\bo_\br_\be_\bd, meaning that the string must match at the beginning of the his-
        tory entry.
 
-       \e[4mint\e[24m \e[1mhistory_search \e[22m(\e[4mconst\e[24m \e[4mchar\e[24m \e[4m*string,\e[24m \e[4mint\e[24m \e[4mdirection\e[24m)
-       Search the history for \e[4mstring\e[24m, starting at the current history  offset.
-       If  \e[4mdirection\e[24m  is  less than 0, then the search is through previous en-
-       tries, otherwise through subsequent entries.  If \e[4mstring\e[24m is found,  then
+       _\bi_\bn_\bt h\bhi\bis\bst\bto\bor\bry\by_\b_s\bse\bea\bar\brc\bch\bh (_\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bs_\bt_\br_\bi_\bn_\bg_\b, _\bi_\bn_\bt _\bd_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn)
+       Search the history for _\bs_\bt_\br_\bi_\bn_\bg, starting at the current history  offset.
+       If  _\bd_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn  is  less than 0, then the search is through previous en-
+       tries, otherwise through subsequent entries.  If _\bs_\bt_\br_\bi_\bn_\bg is found,  then
        the  current  history index is set to that history entry, and the value
-       returned is the offset in the line of the entry where \e[4mstring\e[24m was found.
+       returned is the offset in the line of the entry where _\bs_\bt_\br_\bi_\bn_\bg was found.
        Otherwise, nothing is changed, and a -1 is returned.
 
-       \e[4mint\e[24m \e[1mhistory_search_prefix \e[22m(\e[4mconst\e[24m \e[4mchar\e[24m \e[4m*string,\e[24m \e[4mint\e[24m \e[4mdirection\e[24m)
-       Search  the history for \e[4mstring\e[24m, starting at the current history offset.
-       The search is anchored: matching lines must begin with \e[4mstring\e[24m.  If  \e[4mdi-\e[0m
-       \e[4mrection\e[24m  is  less  than 0, then the search is through previous entries,
-       otherwise through subsequent entries.  If \e[4mstring\e[24m  is  found,  then  the
+       _\bi_\bn_\bt h\bhi\bis\bst\bto\bor\bry\by_\b_s\bse\bea\bar\brc\bch\bh_\b_p\bpr\bre\bef\bfi\bix\bx (_\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bs_\bt_\br_\bi_\bn_\bg_\b, _\bi_\bn_\bt _\bd_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn)
+       Search  the history for _\bs_\bt_\br_\bi_\bn_\bg, starting at the current history offset.
+       The search is anchored: matching lines must begin with _\bs_\bt_\br_\bi_\bn_\bg.  If  _\bd_\bi_\b-
+       _\br_\be_\bc_\bt_\bi_\bo_\bn  is  less  than 0, then the search is through previous entries,
+       otherwise through subsequent entries.  If _\bs_\bt_\br_\bi_\bn_\bg  is  found,  then  the
        current  history index is set to that entry, and the return value is 0.
        Otherwise, nothing is changed, and a -1 is returned.
 
-       \e[4mint\e[24m \e[1mhistory_search_pos \e[22m(\e[4mconst\e[24m \e[4mchar\e[24m \e[4m*string,\e[24m \e[4mint\e[24m \e[4mdirection,\e[24m \e[4mint\e[24m \e[4mpos\e[24m)
-       Search for \e[4mstring\e[24m in the history list, starting at \e[4mpos\e[24m, an absolute in-
-       dex into the list.  If \e[4mdirection\e[24m is negative, the search proceeds back-
-       ward from \e[4mpos\e[24m, otherwise forward.  Returns the absolute  index  of  the
-       history element where \e[4mstring\e[24m was found, or -1 otherwise.
+       _\bi_\bn_\bt h\bhi\bis\bst\bto\bor\bry\by_\b_s\bse\bea\bar\brc\bch\bh_\b_p\bpo\bos\bs (_\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bs_\bt_\br_\bi_\bn_\bg_\b, _\bi_\bn_\bt _\bd_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn_\b, _\bi_\bn_\bt _\bp_\bo_\bs)
+       Search for _\bs_\bt_\br_\bi_\bn_\bg in the history list, starting at _\bp_\bo_\bs, an absolute in-
+       dex into the list.  If _\bd_\bi_\br_\be_\bc_\bt_\bi_\bo_\bn is negative, the search proceeds back-
+       ward from _\bp_\bo_\bs, otherwise forward.  Returns the absolute  index  of  the
+       history element where _\bs_\bt_\br_\bi_\bn_\bg was found, or -1 otherwise.
 
 
-   \e[1mManaging the History File\e[0m
+   M\bMa\ban\bna\bag\bgi\bin\bng\bg t\bth\bhe\be H\bHi\bis\bst\bto\bor\bry\by F\bFi\bil\ble\be
        The  History  library can read the history from and write it to a file.
        This section documents the functions for managing a history file.
 
-       \e[4mint\e[24m \e[1mread_history \e[22m(\e[4mconst\e[24m \e[4mchar\e[24m \e[4m*filename\e[24m)
-       Add the contents of \e[4mfilename\e[24m to the history list, a line at a time.  If
-       \e[4mfilename\e[24m  is \e[1mNULL\e[22m, then read from \e[4m~/.history\e[24m.  Returns 0 if successful,
-       or \e[1merrno \e[22mif not.
+       _\bi_\bn_\bt r\bre\bea\bad\bd_\b_h\bhi\bis\bst\bto\bor\bry\by (_\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bf_\bi_\bl_\be_\bn_\ba_\bm_\be)
+       Add the contents of _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be to the history list, a line at a time.  If
+       _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be  is N\bNU\bUL\bLL\bL, then read from _\b~_\b/_\b._\bh_\bi_\bs_\bt_\bo_\br_\by.  Returns 0 if successful,
+       or e\ber\brr\brn\bno\bif not.
 
-       \e[4mint\e[24m \e[1mread_history_range \e[22m(\e[4mconst\e[24m \e[4mchar\e[24m \e[4m*filename,\e[24m \e[4mint\e[24m \e[4mfrom,\e[24m \e[4mint\e[24m \e[4mto\e[24m)
-       Read a range of lines from \e[4mfilename\e[24m, adding them to the  history  list.
-       Start  reading  at  line \e[4mfrom\e[24m and end at \e[4mto\e[24m.  If \e[4mfrom\e[24m is zero, start at
-       the beginning.  If \e[4mto\e[24m is less than \e[4mfrom\e[24m, then read until the end of the
-       file.   If  \e[4mfilename\e[24m  is \e[1mNULL\e[22m, then read from \e[4m~/.history\e[24m.  Returns 0 if
-       successful, or \e[1merrno \e[22mif not.
+       _\bi_\bn_\bt r\bre\bea\bad\bd_\b_h\bhi\bis\bst\bto\bor\bry\by_\b_r\bra\ban\bng\bge\be (_\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bf_\bi_\bl_\be_\bn_\ba_\bm_\be_\b, _\bi_\bn_\bt _\bf_\br_\bo_\bm_\b, _\bi_\bn_\bt _\bt_\bo)
+       Read a range of lines from _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be, adding them to the  history  list.
+       Start  reading  at  line _\bf_\br_\bo_\bm and end at _\bt_\bo.  If _\bf_\br_\bo_\bm is zero, start at
+       the beginning.  If _\bt_\bo is less than _\bf_\br_\bo_\bm, then read until the end of the
+       file.   If  _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be  is N\bNU\bUL\bLL\bL, then read from _\b~_\b/_\b._\bh_\bi_\bs_\bt_\bo_\br_\by.  Returns 0 if
+       successful, or e\ber\brr\brn\bno\bif not.
 
-       \e[4mint\e[24m \e[1mwrite_history \e[22m(\e[4mconst\e[24m \e[4mchar\e[24m \e[4m*filename\e[24m)
-       Write the current history to \e[4mfilename\e[24m, overwriting \e[4mfilename\e[24m  if  neces-
-       sary.   If \e[4mfilename\e[24m is \e[1mNULL\e[22m, then write the history list to \e[4m~/.history\e[24m.
-       Returns 0 on success, or \e[1merrno \e[22mon a read or write error.
+       _\bi_\bn_\bt w\bwr\bri\bit\bte\be_\b_h\bhi\bis\bst\bto\bor\bry\by (_\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bf_\bi_\bl_\be_\bn_\ba_\bm_\be)
+       Write the current history to _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be, overwriting _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be  if  neces-
+       sary.   If _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be is N\bNU\bUL\bLL\bL, then write the history list to _\b~_\b/_\b._\bh_\bi_\bs_\bt_\bo_\br_\by.
+       Returns 0 on success, or e\ber\brr\brn\bno\bon a read or write error.
 
 
-       \e[4mint\e[24m \e[1mappend_history \e[22m(\e[4mint\e[24m \e[4mnelements,\e[24m \e[4mconst\e[24m \e[4mchar\e[24m \e[4m*filename\e[24m)
-       Append the last \e[4mnelements\e[24m of the history list to \e[4mfilename\e[24m.  If \e[4mfilename\e[0m
-       is  \e[1mNULL\e[22m, then append to \e[4m~/.history\e[24m.  Returns 0 on success, or \e[1merrno \e[22mon
+       _\bi_\bn_\bt a\bap\bpp\bpe\ben\bnd\bd_\b_h\bhi\bis\bst\bto\bor\bry\by (_\bi_\bn_\bt _\bn_\be_\bl_\be_\bm_\be_\bn_\bt_\bs_\b, _\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bf_\bi_\bl_\be_\bn_\ba_\bm_\be)
+       Append the last _\bn_\be_\bl_\be_\bm_\be_\bn_\bt_\bs of the history list to _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be.  If _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be
+       is  N\bNU\bUL\bLL\bL, then append to _\b~_\b/_\b._\bh_\bi_\bs_\bt_\bo_\br_\by.  Returns 0 on success, or e\ber\brr\brn\bno\bon
        a read or write error.
 
-       \e[4mint\e[24m \e[1mhistory_truncate_file \e[22m(\e[4mconst\e[24m \e[4mchar\e[24m \e[4m*filename,\e[24m \e[4mint\e[24m \e[4mnlines\e[24m)
-       Truncate the history file \e[4mfilename\e[24m, leaving only the last \e[4mnlines\e[24m lines.
-       If  \e[4mfilename\e[24m  is \e[1mNULL\e[22m, then \e[4m~/.history\e[24m is truncated.  Returns 0 on suc-
-       cess, or \e[1merrno \e[22mon failure.
+       _\bi_\bn_\bt h\bhi\bis\bst\bto\bor\bry\by_\b_t\btr\bru\bun\bnc\bca\bat\bte\be_\b_f\bfi\bil\ble\be (_\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bf_\bi_\bl_\be_\bn_\ba_\bm_\be_\b, _\bi_\bn_\bt _\bn_\bl_\bi_\bn_\be_\bs)
+       Truncate the history file _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be, leaving only the last _\bn_\bl_\bi_\bn_\be_\bs lines.
+       If  _\bf_\bi_\bl_\be_\bn_\ba_\bm_\be  is N\bNU\bUL\bLL\bL, then _\b~_\b/_\b._\bh_\bi_\bs_\bt_\bo_\br_\by is truncated.  Returns 0 on suc-
+       cess, or e\ber\brr\brn\bno\bon failure.
 
 
-   \e[1mHistory Expansion\e[0m
+   H\bHi\bis\bst\bto\bor\bry\by E\bEx\bxp\bpa\ban\bns\bsi\bio\bon\bn
        These functions implement history expansion.
 
-       \e[4mint\e[24m \e[1mhistory_expand \e[22m(\e[4mchar\e[24m \e[4m*string,\e[24m \e[4mchar\e[24m \e[4m**output\e[24m)
-       Expand \e[4mstring\e[24m, placing the result into \e[4moutput\e[24m, a pointer to  a  string.
+       _\bi_\bn_\bt h\bhi\bis\bst\bto\bor\bry\by_\b_e\bex\bxp\bpa\ban\bnd\bd (_\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bs_\bt_\br_\bi_\bn_\bg_\b, _\bc_\bh_\ba_\br _\b*_\b*_\bo_\bu_\bt_\bp_\bu_\bt)
+       Expand _\bs_\bt_\br_\bi_\bn_\bg, placing the result into _\bo_\bu_\bt_\bp_\bu_\bt, a pointer to  a  string.
        Returns:
               0      If  no  expansions  took place (or, if the only change in
                      the text was the removal of escape  characters  preceding
@@ -383,123 +393,123 @@ HISTORY(3)                 Library Functions Manual                 HISTORY(3)
               1      if expansions did take place;
               -1     if there was an error in expansion;
               2      if  the  returned  line should be displayed, but not exe-
-                     cuted, as with the \e[1m:p \e[22mmodifier.
-       If an error occurred in expansion, then \e[4moutput\e[24m contains  a  descriptive
+                     cuted, as with the :\b:p\bmodifier.
+       If an error occurred in expansion, then _\bo_\bu_\bt_\bp_\bu_\bt contains  a  descriptive
        error message.
 
-       \e[4mchar\e[24m \e[4m*\e[24m \e[1mget_history_event \e[22m(\e[4mconst\e[24m \e[4mchar\e[24m \e[4m*string,\e[24m \e[4mint\e[24m \e[4m*cindex,\e[24m \e[4mint\e[24m \e[4mqchar\e[24m)
-       Returns  the  text  of the history event beginning at \e[4mstring\e[24m + \e[4m*cindex\e[24m.
-       \e[4m*cindex\e[24m is modified to point to after the event specifier.  At function
-       entry,  \e[4mcindex\e[24m  points to the index into \e[4mstring\e[24m where the history event
-       specification begins.  \e[4mqchar\e[24m is a character that is allowed to end  the
+       _\bc_\bh_\ba_\br _\b* g\bge\bet\bt_\b_h\bhi\bis\bst\bto\bor\bry\by_\b_e\bev\bve\ben\bnt\bt (_\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bs_\bt_\br_\bi_\bn_\bg_\b, _\bi_\bn_\bt _\b*_\bc_\bi_\bn_\bd_\be_\bx_\b, _\bi_\bn_\bt _\bq_\bc_\bh_\ba_\br)
+       Returns  the  text  of the history event beginning at _\bs_\bt_\br_\bi_\bn_\bg + _\b*_\bc_\bi_\bn_\bd_\be_\bx.
+       _\b*_\bc_\bi_\bn_\bd_\be_\bx is modified to point to after the event specifier.  At function
+       entry,  _\bc_\bi_\bn_\bd_\be_\bx  points to the index into _\bs_\bt_\br_\bi_\bn_\bg where the history event
+       specification begins.  _\bq_\bc_\bh_\ba_\br is a character that is allowed to end  the
        event  specification  in addition to the ``normal'' terminating charac-
        ters.
 
-       \e[4mchar\e[24m \e[4m**\e[24m \e[1mhistory_tokenize \e[22m(\e[4mconst\e[24m \e[4mchar\e[24m \e[4m*string\e[24m)
-       Return an array of tokens parsed out  of  \e[4mstring\e[24m,  much  as  the  shell
-       might.   The tokens are split on the characters in the \e[1mhistory_word_de-\e[0m
-       \e[1mlimiters \e[22mvariable, and shell quoting conventions are obeyed.
+       _\bc_\bh_\ba_\br _\b*_\b* h\bhi\bis\bst\bto\bor\bry\by_\b_t\bto\bok\bke\ben\bni\biz\bze\be (_\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bs_\bt_\br_\bi_\bn_\bg)
+       Return an array of tokens parsed out  of  _\bs_\bt_\br_\bi_\bn_\bg,  much  as  the  shell
+       might.   The tokens are split on the characters in the h\bhi\bis\bst\bto\bor\bry\by_\b_w\bwo\bor\brd\bd_\b_d\bde\be-\b-
+       l\bli\bim\bmi\bit\bte\ber\brs\bvariable, and shell quoting conventions are obeyed.
 
-       \e[4mchar\e[24m \e[4m*\e[24m \e[1mhistory_arg_extract \e[22m(\e[4mint\e[24m \e[4mfirst,\e[24m \e[4mint\e[24m \e[4mlast,\e[24m \e[4mconst\e[24m \e[4mchar\e[24m \e[4m*string\e[24m)
-       Extract a string segment consisting of the \e[4mfirst\e[24m through \e[4mlast\e[24m arguments
-       present in \e[4mstring\e[24m.  Arguments are split using \e[1mhistory_tokenize()\e[22m.
+       _\bc_\bh_\ba_\br _\b* h\bhi\bis\bst\bto\bor\bry\by_\b_a\bar\brg\bg_\b_e\bex\bxt\btr\bra\bac\bct\bt (_\bi_\bn_\bt _\bf_\bi_\br_\bs_\bt_\b, _\bi_\bn_\bt _\bl_\ba_\bs_\bt_\b, _\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bs_\bt_\br_\bi_\bn_\bg)
+       Extract a string segment consisting of the _\bf_\bi_\br_\bs_\bt through _\bl_\ba_\bs_\bt arguments
+       present in _\bs_\bt_\br_\bi_\bn_\bg.  Arguments are split using h\bhi\bis\bst\bto\bor\bry\by_\b_t\bto\bok\bke\ben\bni\biz\bze\be(\b()\b).
 
 
-   \e[1mHistory Variables\e[0m
+   H\bHi\bis\bst\bto\bor\bry\by V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs
        This section describes the externally-visible variables exported by the
        GNU History Library.
 
-       \e[4mint\e[24m \e[1mhistory_base\e[0m
+       _\bi_\bn_\bt h\bhi\bis\bst\bto\bor\bry\by_\b_b\bba\bas\bse\be
        The logical offset of the first entry in the history list.
 
-       \e[4mint\e[24m \e[1mhistory_length\e[0m
+       _\bi_\bn_\bt h\bhi\bis\bst\bto\bor\bry\by_\b_l\ble\ben\bng\bgt\bth\bh
        The number of entries currently stored in the history list.
 
-       \e[4mint\e[24m \e[1mhistory_max_entries\e[0m
-       The maximum number of history entries.  This must be changed using \e[1msti-\e[0m
-       \e[1mfle_history()\e[22m.
+       _\bi_\bn_\bt h\bhi\bis\bst\bto\bor\bry\by_\b_m\bma\bax\bx_\b_e\ben\bnt\btr\bri\bie\bes\bs
+       The maximum number of history entries.  This must be changed using s\bst\bti\bi-\b-
+       f\bfl\ble\be_\b_h\bhi\bis\bst\bto\bor\bry\by(\b()\b).
 
-       \e[4mint\e[24m \e[1mhistory_write_timestamps\e[0m
+       _\bi_\bn_\bt h\bhi\bis\bst\bto\bor\bry\by_\b_w\bwr\bri\bit\bte\be_\b_t\bti\bim\bme\bes\bst\bta\bam\bmp\bps\bs
        If non-zero, timestamps are written to the history file, so they can be
        preserved between sessions.  The default value is 0, meaning that time-
        stamps  are  not saved.  The current timestamp format uses the value of
-       \e[4mhistory_comment_char\e[24m to delimit timestamp entries in the history  file.
+       _\bh_\bi_\bs_\bt_\bo_\br_\by_\b__\bc_\bo_\bm_\bm_\be_\bn_\bt_\b__\bc_\bh_\ba_\br to delimit timestamp entries in the history  file.
        If  that  variable does not have a value (the default), timestamps will
        not be written.
 
-       \e[4mchar\e[24m \e[1mhistory_expansion_char\e[0m
-       The character that introduces a history event.  The default is \e[1m!\e[22m.  Set-
+       _\bc_\bh_\ba_\br h\bhi\bis\bst\bto\bor\bry\by_\b_e\bex\bxp\bpa\ban\bns\bsi\bio\bon\bn_\b_c\bch\bha\bar\br
+       The character that introduces a history event.  The default is !\b!.  Set-
        ting this to 0 inhibits history expansion.
 
-       \e[4mchar\e[24m \e[1mhistory_subst_char\e[0m
+       _\bc_\bh_\ba_\br h\bhi\bis\bst\bto\bor\bry\by_\b_s\bsu\bub\bbs\bst\bt_\b_c\bch\bha\bar\br
        The character that invokes word substitution if found at the start of a
-       line.  The default is \e[1m^\e[22m.
+       line.  The default is ^\b^.
 
-       \e[4mchar\e[24m \e[1mhistory_comment_char\e[0m
+       _\bc_\bh_\ba_\br h\bhi\bis\bst\bto\bor\bry\by_\b_c\bco\bom\bmm\bme\ben\bnt\bt_\b_c\bch\bha\bar\br
        During tokenization, if this character is seen as the  first  character
        of  a  word,  then it and all subsequent characters up to a newline are
        ignored, suppressing history expansion for the remainder of  the  line.
        This is disabled by default.
 
-       \e[4mchar\e[24m \e[4m*\e[24m \e[1mhistory_word_delimiters\e[0m
-       The  characters  that  separate tokens for \e[1mhistory_tokenize()\e[22m.  The de-
-       fault value is \e[1m" \t\n()<>;&|"\e[22m.
+       _\bc_\bh_\ba_\br _\b* h\bhi\bis\bst\bto\bor\bry\by_\b_w\bwo\bor\brd\bd_\b_d\bde\bel\bli\bim\bmi\bit\bte\ber\brs\bs
+       The  characters  that  separate tokens for h\bhi\bis\bst\bto\bor\bry\by_\b_t\bto\bok\bke\ben\bni\biz\bze\be(\b()\b).  The de-
+       fault value is "\b" \\b\t\bt\\b\n\bn(\b()\b)<\b<>\b>;\b;&\b&|\b|"\b".
 
-       \e[4mchar\e[24m \e[4m*\e[24m \e[1mhistory_no_expand_chars\e[0m
+       _\bc_\bh_\ba_\br _\b* h\bhi\bis\bst\bto\bor\bry\by_\b_n\bno\bo_\b_e\bex\bxp\bpa\ban\bnd\bd_\b_c\bch\bha\bar\brs\bs
        The list of characters which inhibit history expansion if found immedi-
-       ately  following  \e[1mhistory_expansion_char\e[22m.   The  default is space, tab,
-       newline, \e[1m\r\e[22m, and \e[1m=\e[22m.
+       ately  following  h\bhi\bis\bst\bto\bor\bry\by_\b_e\bex\bxp\bpa\ban\bns\bsi\bio\bon\bn_\b_c\bch\bha\bar\br.   The  default is space, tab,
+       newline, \\b\r\br, and =\b=.
 
-       \e[4mchar\e[24m \e[4m*\e[24m \e[1mhistory_search_delimiter_chars\e[0m
+       _\bc_\bh_\ba_\br _\b* h\bhi\bis\bst\bto\bor\bry\by_\b_s\bse\bea\bar\brc\bch\bh_\b_d\bde\bel\bli\bim\bmi\bit\bte\ber\br_\b_c\bch\bha\bar\brs\bs
        The list of additional characters which can delimit  a  history  search
-       string,  in  addition to space, tab, \e[4m:\e[24m and \e[4m?\e[24m in the case of a substring
+       string,  in  addition to space, tab, _\b: and _\b? in the case of a substring
        search.  The default is empty.
 
-       \e[4mint\e[24m \e[1mhistory_quotes_inhibit_expansion\e[0m
+       _\bi_\bn_\bt h\bhi\bis\bst\bto\bor\bry\by_\b_q\bqu\buo\bot\bte\bes\bs_\b_i\bin\bnh\bhi\bib\bbi\bit\bt_\b_e\bex\bxp\bpa\ban\bns\bsi\bio\bon\bn
        If non-zero, double-quoted words are not scanned for the history expan-
        sion  character or the history comment character.  The default value is
        0.
 
-       \e[4mrl_linebuf_func_t\e[24m \e[4m*\e[24m \e[1mhistory_inhibit_expansion_function\e[0m
+       _\br_\bl_\b__\bl_\bi_\bn_\be_\bb_\bu_\bf_\b__\bf_\bu_\bn_\bc_\b__\bt _\b* h\bhi\bis\bst\bto\bor\bry\by_\b_i\bin\bnh\bhi\bib\bbi\bit\bt_\b_e\bex\bxp\bpa\ban\bns\bsi\bio\bon\bn_\b_f\bfu\bun\bnc\bct\bti\bio\bon\bn
        This should be set to the address of a function that  takes  two  argu-
-       ments:  a  \e[1mchar  *  \e[22m(\e[4mstring\e[24m) and an \e[1mint \e[22mindex into that string (\e[4mi\e[24m).  It
+       ments:  a  c\bch\bha\bar\br  *\b*  (_\bs_\bt_\br_\bi_\bn_\bg) and an i\bin\bnt\bt index into that string (_\bi).  It
        should return a non-zero value if the  history  expansion  starting  at
-       \e[4mstring[i]\e[24m  should  not  be  performed;  zero if the expansion should be
-       done.  It is intended for use by applications like \e[1mbash  \e[22mthat  use  the
+       _\bs_\bt_\br_\bi_\bn_\bg_\b[_\bi_\b]  should  not  be  performed;  zero if the expansion should be
+       done.  It is intended for use by applications like b\bba\bas\bsh\bh  that  use  the
        history  expansion character for additional purposes.  By default, this
-       variable is set to \e[1mNULL\e[22m.
+       variable is set to N\bNU\bUL\bLL\bL.
 
-\e[1mFILES\e[0m
-       \e[4m~/.history\e[0m
+F\bFI\bIL\bLE\bES\bS
+       _\b~_\b/_\b._\bh_\bi_\bs_\bt_\bo_\br_\by
               Default filename for reading and writing saved history
 
-\e[1mSEE ALSO\e[0m
-       \e[4mThe\e[24m \e[4mGnu\e[24m \e[4mReadline\e[24m \e[4mLibrary\e[24m, Brian Fox and Chet Ramey
-       \e[4mThe\e[24m \e[4mGnu\e[24m \e[4mHistory\e[24m \e[4mLibrary\e[24m, Brian Fox and Chet Ramey
-       \e[4mbash\e[24m(1)
-       \e[4mreadline\e[24m(3)
+S\bSE\bEE\bE A\bAL\bLS\bSO\bO
+       _\bT_\bh_\be _\bG_\bn_\bu _\bR_\be_\ba_\bd_\bl_\bi_\bn_\be _\bL_\bi_\bb_\br_\ba_\br_\by, Brian Fox and Chet Ramey
+       _\bT_\bh_\be _\bG_\bn_\bu _\bH_\bi_\bs_\bt_\bo_\br_\by _\bL_\bi_\bb_\br_\ba_\br_\by, Brian Fox and Chet Ramey
+       _\bb_\ba_\bs_\bh(1)
+       _\br_\be_\ba_\bd_\bl_\bi_\bn_\be(3)
 
-\e[1mAUTHORS\e[0m
+A\bAU\bUT\bTH\bHO\bOR\bRS\bS
        Brian Fox, Free Software Foundation
        bfox@gnu.org
 
        Chet Ramey, Case Western Reserve University
        chet.ramey@case.edu
 
-\e[1mBUG REPORTS\e[0m
-       If you find a bug in the \e[1mhistory \e[22mlibrary, you should  report  it.   But
+B\bBU\bUG\bG R\bRE\bEP\bPO\bOR\bRT\bTS\bS
+       If you find a bug in the h\bhi\bis\bst\bto\bor\bry\blibrary, you should  report  it.   But
        first,  you  should  make sure that it really is a bug, and that it ap-
-       pears in the latest version of the \e[1mhistory \e[22mlibrary that you have.
+       pears in the latest version of the h\bhi\bis\bst\bto\bor\bry\blibrary that you have.
 
        Once you have determined that a bug actually exists, mail a bug  report
-       to  \e[4mbug-readline\e[24m@\e[4mgnu.org\e[24m.   If  you have a fix, you are welcome to mail
+       to  _\bb_\bu_\bg_\b-_\br_\be_\ba_\bd_\bl_\bi_\bn_\be@_\bg_\bn_\bu_\b._\bo_\br_\bg.   If  you have a fix, you are welcome to mail
        that as well!  Suggestions  and  `philosophical'  bug  reports  may  be
-       mailed  to  \e[4mbug-readline\e[24m@\e[4mgnu.org\e[24m  or  posted  to  the  Usenet newsgroup
-       \e[1mgnu.bash.bug\e[22m.
+       mailed  to  _\bb_\bu_\bg_\b-_\br_\be_\ba_\bd_\bl_\bi_\bn_\be@_\bg_\bn_\bu_\b._\bo_\br_\bg  or  posted  to  the  Usenet newsgroup
+       g\bgn\bnu\bu.\b.b\bba\bas\bsh\bh.\b.b\bbu\bug\bg.
 
        Comments and bug reports concerning this manual page should be directed
-       to \e[4mchet.ramey@case.edu\e[24m.
+       to _\bc_\bh_\be_\bt_\b._\br_\ba_\bm_\be_\by_\b@_\bc_\ba_\bs_\be_\b._\be_\bd_\bu.
 
 
 
-GNU History 8.1                  2020 July 17                       HISTORY(3)
+GNU History 8.3                 2023 January 18                     HISTORY(3)
index 76e102535ecaf8c3a6cca46b653d73c5f3d769bb..0ecbe1b46588c55821f76f3853cc351dfe3d3210 100644 (file)
@@ -6,15 +6,22 @@
 .\"    Case Western Reserve University
 .\"    chet.ramey@case.edu
 .\"
-.\"    Last Change: Thu Dec 14 15:42:44 EST 2023
+.\"    Last Change: Fri Jan 19 11:53:57 EST 2024
 .\"
-.TH HISTORY 3 "2023 December 14" "GNU History 8.3"
+.TH HISTORY 3 "2024 January 19" "GNU History 8.3"
 .\"
 .\" File Name macro.  This used to be `.PN', for Path Name,
 .\" but Sun doesn't seem to like that very much.
 .\"
 .de FN
-\fI\|\\$1\|\fP
+\%\fI\|\\$1\|\fP
+..
+.de Q
+.ie \n(.g \(lq\\$1\(rq\\$2
+.el \{
+.  if t ``\\$1''\\$2
+.  if n "\\$1"\\$2
+.\}
 ..
 .ds lp \fR\|(\fP
 .ds rp \fR\|)\fP
@@ -40,8 +47,8 @@
 .SH NAME
 history \- GNU History Library
 .SH COPYRIGHT
-.if t The GNU History Library is Copyright \(co 1989-2023 by the Free Software Foundation, Inc.
-.if n The GNU History Library is Copyright (C) 1989-2023 by the Free Software Foundation, Inc.
+.if t The GNU History Library is Copyright \(co 1989-2024 by the Free Software Foundation, Inc.
+.if n The GNU History Library is Copyright (C) 1989-2024 by the Free Software Foundation, Inc.
 .SH DESCRIPTION
 Many programs read input from the user a line at a time.  The GNU
 History library is able to keep track of those lines, associate arbitrary
@@ -136,7 +143,7 @@ Quick substitution.  Repeat the last command, replacing
 with
 .IR string2 .
 Equivalent to
-``!!:s\d\s+2\(ha\s-2\u\fIstring1\fP\d\s+2\(ha\s-2\u\fIstring2\fP\d\s+2\(ha\s-2\u''
+.Q !!:s\d\s+2\(ha\s-2\u\fIstring1\fP\d\s+2\(ha\s-2\u\fIstring2\fP\d\s+2\(ha\s-2\u
 (see \fBModifiers\fP below).
 .TP
 .B !#
@@ -638,8 +645,23 @@ string, in addition to space, tab, \fI:\fP and \fI?\fP in the case of
 a substring search.  The default is empty.
 
 .Vb int history_quotes_inhibit_expansion
-If non-zero, double-quoted words are not scanned for the history expansion
-character or the history comment character.  The default value is 0.
+If non-zero, the history expansion code implements shell-like quoting:
+single-quoted words are not scanned for the history expansion
+character or the history comment character, and double-quoted words may
+have history expansion performed, since single quotes are not special
+within double quotes.
+The default value is 0.
+
+.Vb int history_quoting_state
+An application may set this variable to indicate that the current line
+being expanded is subject to existing quoting. If set to \fI\(aq\fP, the
+history expansion function will assume that the line is single-quoted and
+inhibit expansion until it reads an unquoted closing single quote; if set
+to \fI\(dq\fP, history expansion will assume the line is double quoted until
+it reads an unquoted closing double quote. If set to zero, the default,
+the history expansion function will assume the line is not quoted and
+treat quote characters within the line as described above.
+This is only effective if \fBhistory_quotes_inhibit_expansion\fP is set.
 
 .Vb "rl_linebuf_func_t *" history_inhibit_expansion_function
 This should be set to the address of a function that takes two arguments:
index dab64a09e02b5563c47032dbe3dbe6b14cf92f05..4c5dc84a1256a03b079eeb3010644b6b7b25347b 100644 (file)
@@ -193,7 +193,7 @@ With no options, display the history list with line numbers.
 Lines prefixed with a @samp{*} have been modified.
 An argument of @var{n} lists only the last @var{n} lines.
 If the shell variable @env{HISTTIMEFORMAT} is set and not null,
-it is used as a format string for @var{strftime} to display
+it is used as a format string for @code{strftime}(3) to display
 the time stamp associated with each displayed history entry.
 No intervening blank is printed between the formatted time stamp
 and the history line.
index b7c45a78d8cc4127b69518cd376a503cb2a6b353..3998a825ec8d9b39cefc6aaf5cb792bd8474b211 100644 (file)
@@ -2,74 +2,77 @@ READLINE(3)                Library Functions Manual                READLINE(3)
 
 
 
-\e[1mNAME\e[0m
+N\bNA\bAM\bME\bE
        readline - get a line from a user with editing
 
-\e[1mSYNOPSIS\e[0m
-       \e[1m#include <stdio.h>\e[0m
-       \e[1m#include <readline/readline.h>\e[0m
-       \e[1m#include <readline/history.h>\e[0m
+S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
+       #\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<s\bst\btd\bdi\bio\bo.\b.h\bh>\b>
+       #\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<r\bre\bea\bad\bdl\bli\bin\bne\be/\b/r\bre\bea\bad\bdl\bli\bin\bne\be.\b.h\bh>\b>
+       #\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<r\bre\bea\bad\bdl\bli\bin\bne\be/\b/h\bhi\bis\bst\bto\bor\bry\by.\b.h\bh>\b>
 
-       \e[4mchar\e[24m \e[4m*\e[0m
-       \e[1mreadline \e[22m(\e[4mconst\e[24m \e[4mchar\e[24m \e[4m*prompt\e[24m);
+       _\bc_\bh_\ba_\br _\b*
+       r\bre\bea\bad\bdl\bli\bin\bne\be (_\bc_\bo_\bn_\bs_\bt _\bc_\bh_\ba_\br _\b*_\bp_\br_\bo_\bm_\bp_\bt);
 
-\e[1mCOPYRIGHT\e[0m
-       Readline is Copyright (C) 1989-2020 Free Software Foundation,  Inc.
+C\bCO\bOP\bPY\bYR\bRI\bIG\bGH\bHT\bT
+       Readline is Copyright (C) 1989-2024 Free Software Foundation,  Inc.
 
-\e[1mDESCRIPTION\e[0m
-       \e[1mreadline \e[22mwill read a line from the terminal and return it, using \e[1mprompt\e[0m
-       as a prompt.  If \e[1mprompt \e[22mis \e[1mNULL \e[22mor the empty string, no prompt  is  is-
-       sued.   The  line returned is allocated with \e[4mmalloc\e[24m(3); the caller must
+D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
+       r\bre\bea\bad\bdl\bli\bin\bne\be will read a line from the terminal and return it, using p\bpr\bro\bom\bmp\bpt\bt
+       as a prompt.  If p\bpr\bro\bom\bmp\bpt\bt is N\bNU\bUL\bLL\bor the empty string, no prompt  is  is-
+       sued.   The  line returned is allocated with _\bm_\ba_\bl_\bl_\bo_\bc(3); the caller must
        free it when finished.  The line returned has  the  final  newline  re-
-       moved, so only the text of the line remains.
+       moved,  so  only  the text of the line remains.  Since it's possible to
+       enter characters into the line while quoting them to disable any  r\bre\bea\bad\bd-\b-
+       l\bli\bin\bne\be  editing  function they might normally have, this line may include
+       embedded newlines and other special characters.
 
-       \e[1mreadline  \e[22moffers  editing  capabilities  while the user is entering the
-       line.  By default, the line editing commands are similar  to  those  of
+       r\bre\bea\bad\bdl\bli\bin\bne\be offers editing capabilities while the  user  is  entering  the
+       line.   By  default,  the line editing commands are similar to those of
        emacs.  A vi-style line editing interface is also available.
 
-       This  manual  page describes only the most basic use of \e[1mreadline\e[22m.  Much
-       more functionality is available; see \e[4mThe\e[24m \e[4mGNU\e[24m \e[4mReadline\e[24m \e[4mLibrary\e[24m  and  \e[4mThe\e[0m
-       \e[4mGNU\e[24m \e[4mHistory\e[24m \e[4mLibrary\e[24m for additional information.
+       This manual page describes only the most basic use of  r\bre\bea\bad\bdl\bli\bin\bne\be.   Much
+       more  functionality  is available; see _\bT_\bh_\be _\bG_\bN_\bU _\bR_\be_\ba_\bd_\bl_\bi_\bn_\be _\bL_\bi_\bb_\br_\ba_\br_\by and _\bT_\bh_\be
+       _\bG_\bN_\bU _\bH_\bi_\bs_\bt_\bo_\br_\by _\bL_\bi_\bb_\br_\ba_\br_\by for additional information.
 
-\e[1mRETURN VALUE\e[0m
-       \e[1mreadline  \e[22mreturns  the text of the line read.  A blank line returns the
-       empty string.  If \e[1mEOF \e[22mis encountered while reading a line, and the line
-       is  empty,  \e[1mNULL \e[22mis returned.  If an \e[1mEOF \e[22mis read with a non-empty line,
+R\bRE\bET\bTU\bUR\bRN\bN V\bVA\bAL\bLU\bUE\bE
+       r\bre\bea\bad\bdl\bli\bin\bne\be returns the text of the line read.  A blank line  returns  the
+       empty string.  If E\bEO\bOF\bis encountered while reading a line, and the line
+       is empty, N\bNU\bUL\bLL\bL is returned.  If an E\bEO\bOF\bF is read with a  non-empty  line,
        it is treated as a newline.
 
-\e[1mNOTATION\e[0m
+N\bNO\bOT\bTA\bAT\bTI\bIO\bON\bN
        An Emacs-style notation is used to denote keystrokes.  Control keys are
-       denoted  by C-\e[4mkey\e[24m, e.g., C-n means Control-N.  Similarly, \e[4mmeta\e[24m keys are
-       denoted by M-\e[4mkey\e[24m, so M-x means Meta-X.  (On keyboards  without  a  \e[4mmeta\e[0m
-       key,  M-\e[4mx\e[24m means ESC \e[4mx\e[24m, i.e., press the Escape key then the \e[4mx\e[24m key.  This
-       makes ESC the \e[4mmeta\e[24m \e[4mprefix\e[24m.  The combination M-C-\e[4mx\e[24m means  ESC-Control-\e[4mx\e[24m,
-       or  press the Escape key then hold the Control key while pressing the \e[4mx\e[0m
+       denoted by C-_\bk_\be_\by, e.g., C-n means Control-N.  Similarly, _\bm_\be_\bt_\ba keys  are
+       denoted  by  M-_\bk_\be_\by,  so M-x means Meta-X.  (On keyboards without a _\bm_\be_\bt_\ba
+       key, M-_\bx means ESC _\bx, i.e., press the Escape key then the _\bx key.   This
+       makes  ESC the _\bm_\be_\bt_\ba _\bp_\br_\be_\bf_\bi_\bx.  The combination M-C-_\bx means ESC-Control-_\bx,
+       or press the Escape key then hold the Control key while pressing the  _\bx
        key.)
 
-       Readline commands may be given numeric \e[4marguments\e[24m, which normally act as
-       a  repeat  count.   Sometimes,  however, it is the sign of the argument
-       that is significant.  Passing a negative argument  to  a  command  that
-       acts  in the forward direction (e.g., \e[1mkill-line\e[22m) causes that command to
-       act in a backward direction.  Commands whose  behavior  with  arguments
+       Readline commands may be given numeric _\ba_\br_\bg_\bu_\bm_\be_\bn_\bt_\bs, which normally act as
+       a repeat count.  Sometimes, however, it is the  sign  of  the  argument
+       that  is  significant.   Passing  a negative argument to a command that
+       acts in the forward direction (e.g., k\bki\bil\bll\bl-\b-l\bli\bin\bne\be) causes that command  to
+       act  in  a  backward direction.  Commands whose behavior with arguments
        deviates from this are noted below.
 
-       When  a command is described as \e[4mkilling\e[24m text, the text deleted is saved
-       for possible future retrieval (\e[4myanking\e[24m).  The killed text is saved in a
-       \e[4mkill\e[24m \e[4mring\e[24m.  Consecutive kills cause the text to be accumulated into one
+       When a command is described as _\bk_\bi_\bl_\bl_\bi_\bn_\bg text, the text deleted is  saved
+       for possible future retrieval (_\by_\ba_\bn_\bk_\bi_\bn_\bg).  The killed text is saved in a
+       _\bk_\bi_\bl_\bl _\br_\bi_\bn_\bg.  Consecutive kills cause the text to be accumulated into one
        unit, which can be yanked all at once.  Commands which do not kill text
        separate the chunks of text on the kill ring.
 
-\e[1mINITIALIZATION FILE\e[0m
-       Readline  is  customized  by putting commands in an initialization file
-       (the \e[4minputrc\e[24m file).  The name of this file is taken from the  value  of
-       the  \e[1mINPUTRC  \e[22menvironment variable.  If that variable is unset, the de-
-       fault is \e[4m~/.inputrc\e[24m.  If that file  does not exist or cannot  be  read,
-       the  ultimate  default  is \e[4m/etc/inputrc\e[24m.  When a program which uses the
+I\bIN\bNI\bIT\bTI\bIA\bAL\bLI\bIZ\bZA\bAT\bTI\bIO\bON\bN F\bFI\bIL\bLE\bE
+       Readline is customized by putting commands in  an  initialization  file
+       (the  _\bi_\bn_\bp_\bu_\bt_\br_\bc  file).  The name of this file is taken from the value of
+       the I\bIN\bNP\bPU\bUT\bTR\bRC\bC environment variable.  If that variable is unset,  the  de-
+       fault  is  _\b~_\b/_\b._\bi_\bn_\bp_\bu_\bt_\br_\bc.  If that file  does not exist or cannot be read,
+       the ultimate default is _\b/_\be_\bt_\bc_\b/_\bi_\bn_\bp_\bu_\bt_\br_\bc.  When a program  which  uses  the
        readline library starts up, the init file is read, and the key bindings
-       and  variables  are set.  There are only a few basic constructs allowed
-       in the readline init file.  Blank lines are ignored.   Lines  beginning
-       with  a  \e[1m# \e[22mare comments.  Lines beginning with a \e[1m$ \e[22mindicate conditional
-       constructs.  Other lines denote key  bindings  and  variable  settings.
+       and variables are set.  There are only a few basic  constructs  allowed
+       in  the  readline init file.  Blank lines are ignored.  Lines beginning
+       with a #\b# are comments.  Lines beginning with a $\b$  indicate  conditional
+       constructs.   Other  lines  denote  key bindings and variable settings.
        Each program using this library may add its own commands and bindings.
 
        For example, placing
@@ -78,203 +81,206 @@ READLINE(3)                Library Functions Manual                READLINE(3)
        or
               C-Meta-u: universal-argument
 
-       into  the \e[4minputrc\e[24m would make M-C-u execute the readline command \e[4muniver-\e[0m
-       \e[4msal-argument\e[24m.
+       into the _\bi_\bn_\bp_\bu_\bt_\br_\bc would make M-C-u execute the readline command  _\bu_\bn_\bi_\bv_\be_\br_\b-
+       _\bs_\ba_\bl_\b-_\ba_\br_\bg_\bu_\bm_\be_\bn_\bt.
 
-       The following symbolic character names are recognized while  processing
-       key  bindings:  \e[4mDEL\e[24m,  \e[4mESC\e[24m,  \e[4mESCAPE\e[24m,  \e[4mLFD\e[24m, \e[4mNEWLINE\e[24m, \e[4mRET\e[24m, \e[4mRETURN\e[24m, \e[4mRUBOUT\e[24m,
-       \e[4mSPACE\e[24m, \e[4mSPC\e[24m, and \e[4mTAB\e[24m.
+       The  following symbolic character names are recognized while processing
+       key bindings: _\bD_\bE_\bL, _\bE_\bS_\bC, _\bE_\bS_\bC_\bA_\bP_\bE,  _\bL_\bF_\bD,  _\bN_\bE_\bW_\bL_\bI_\bN_\bE,  _\bR_\bE_\bT,  _\bR_\bE_\bT_\bU_\bR_\bN,  _\bR_\bU_\bB_\bO_\bU_\bT,
+       _\bS_\bP_\bA_\bC_\bE, _\bS_\bP_\bC, and _\bT_\bA_\bB.
 
-       In addition to command names, readline allows keys to  be  bound  to  a
-       string that is inserted when the key is pressed (a \e[4mmacro\e[24m).
+       In  addition  to  command  names, readline allows keys to be bound to a
+       string that is inserted when the key is pressed (a _\bm_\ba_\bc_\br_\bo).
 
-   \e[1mKey Bindings\e[0m
-       The  syntax for controlling key bindings in the \e[4minputrc\e[24m file is simple.
-       All that is required is the name of the command or the text of a  macro
+   K\bKe\bey\by B\bBi\bin\bnd\bdi\bin\bng\bgs\bs
+       The syntax for controlling key bindings in the _\bi_\bn_\bp_\bu_\bt_\br_\bc file is  simple.
+       All  that is required is the name of the command or the text of a macro
        and a key sequence to which it should be bound.  The name may be speci-
-       fied in one of two ways: as a symbolic key name, possibly with \e[4mMeta-\e[24m or
-       \e[4mControl-\e[24m prefixes, or as a key sequence.  The name and key sequence are
-       separated by a colon.  There can be no whitespace between the name  and
+       fied in one of two ways: as a symbolic key name, possibly with _\bM_\be_\bt_\ba_\b- or
+       _\bC_\bo_\bn_\bt_\br_\bo_\bl_\b- prefixes, or as a key sequence.  The name and key sequence are
+       separated  by a colon.  There can be no whitespace between the name and
        the colon.
 
-       When using the form \e[1mkeyname\e[22m:\e[4mfunction-name\e[24m or \e[4mmacro\e[24m, \e[4mkeyname\e[24m is the name
+       When using the form k\bke\bey\byn\bna\bam\bme\be:_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be or _\bm_\ba_\bc_\br_\bo, _\bk_\be_\by_\bn_\ba_\bm_\be is the name
        of a key spelled out in English.  For example:
 
               Control-u: universal-argument
               Meta-Rubout: backward-kill-word
               Control-o: "> output"
 
-       In the above example, \e[4mC-u\e[24m is bound to the function  \e[1muniversal-argument\e[22m,
-       \e[4mM-DEL\e[24m  is bound to the function \e[1mbackward-kill-word\e[22m, and \e[4mC-o\e[24m is bound to
-       run the macro expressed on the right hand side (that is, to insert  the
-       text ``> output'' into the line).
+       In  the above example, _\bC_\b-_\bu is bound to the function u\bun\bni\biv\bve\ber\brs\bsa\bal\bl-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt,
+       _\bM_\b-_\bD_\bE_\bL is bound to the function b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd, and _\bC_\b-_\bo is bound  to
+       run  the macro expressed on the right hand side (that is, to insert the
+       text "> output" into the line).
 
-       In  the  second  form,  \e[1m"keyseq"\e[22m:\e[4mfunction-name\e[24m or \e[4mmacro\e[24m, \e[1mkeyseq \e[22mdiffers
-       from \e[1mkeyname \e[22mabove in that strings denoting an entire key sequence  may
-       be  specified  by  placing the sequence within double quotes.  Some GNU
-       Emacs style key escapes can be used, as in the following  example,  but
+       In the second form, "\b"k\bke\bey\bys\bse\beq\bq"\b":_\bf_\bu_\bn_\bc_\bt_\bi_\bo_\bn_\b-_\bn_\ba_\bm_\be  or  _\bm_\ba_\bc_\br_\bo,  k\bke\bey\bys\bse\beq\bq  differs
+       from  k\bke\bey\byn\bna\bam\bme\be above in that strings denoting an entire key sequence may
+       be specified by placing the sequence within double  quotes.   Some  GNU
+       Emacs  style  key escapes can be used, as in the following example, but
        the symbolic character names are not recognized.
 
               "\C-u": universal-argument
               "\C-x\C-r": re-read-init-file
               "\e[11~": "Function Key 1"
 
-       In this example, \e[4mC-u\e[24m is again bound to the function \e[1muniversal-argument\e[22m.
-       \e[4mC-x\e[24m \e[4mC-r\e[24m is bound to the function \e[1mre-read-init-file\e[22m, and \e[4mESC\e[24m \e[4m[\e[24m \e[4m1\e[24m \e[4m1\e[24m \e[4m~\e[24m  is
-       bound to insert the text ``Function Key 1''.
+       In this example, _\bC_\b-_\bu is again bound to the function u\bun\bni\biv\bve\ber\brs\bsa\bal\bl-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt.
+       _\bC_\b-_\bx  _\bC_\b-_\br is bound to the function r\bre\be-\b-r\bre\bea\bad\bd-\b-i\bin\bni\bit\bt-\b-f\bfi\bil\ble\be, and _\bE_\bS_\bC _\b[ _\b1 _\b1 _\b~ is
+       bound to insert the text "Function Key 1".
 
-       The  full set of GNU Emacs style escape sequences available when speci-
+       The full set of GNU Emacs style escape sequences available when  speci-
        fying key sequences is
-              \e[1m\C-    \e[22mcontrol prefix
-              \e[1m\M-    \e[22mmeta prefix
-              \e[1m\e     \e[22man escape character
-              \e[1m\\     \e[22mbackslash
-              \e[1m\"     \e[22mliteral ", a double quote
-              \e[1m\'     \e[22mliteral ', a single quote
-
-       In addition to the GNU Emacs style escape sequences, a  second  set  of
+              \\b\C\bC-\b-    control prefix
+              \\b\M\bM-\b-    meta prefix
+              \\b\e\be     an escape character
+              \\b\\\b\     backslash
+              \\b\"\b"     literal ", a double quote
+              \\b\'\b'     literal ', a single quote
+
+       In  addition  to  the GNU Emacs style escape sequences, a second set of
        backslash escapes is available:
-              \e[1m\a     \e[22malert (bell)
-              \e[1m\b     \e[22mbackspace
-              \e[1m\d     \e[22mdelete
-              \e[1m\f     \e[22mform feed
-              \e[1m\n     \e[22mnewline
-              \e[1m\r     \e[22mcarriage return
-              \e[1m\t     \e[22mhorizontal tab
-              \e[1m\v     \e[22mvertical tab
-              \e[1m\\e[4m\e[22mnnn\e[24m   the  eight-bit  character  whose value is the octal value
-                     \e[4mnnn\e[24m (one to three digits)
-              \e[1m\x\e[4m\e[22mHH\e[24m   the eight-bit character whose value  is  the  hexadecimal
-                     value \e[4mHH\e[24m (one or two hex digits)
-
-       When  entering  the  text of a macro, single or double quotes should be
-       used to indicate a macro definition.  Unquoted text is assumed to be  a
-       function  name.   In  the  macro  body, the backslash escapes described
-       above are expanded.  Backslash will quote any other  character  in  the
+              \\b\a\ba     alert (bell)
+              \\b\b\bb     backspace
+              \\b\d\bd     delete
+              \\b\f\bf     form feed
+              \\b\n\bn     newline
+              \\b\r\br     carriage return
+              \\b\t\bt     horizontal tab
+              \\b\v\bv     vertical tab
+              \\b\_\bn_\bn_\bn   the eight-bit character whose value is  the  octal  value
+                     _\bn_\bn_\bn (one to three digits)
+              \\b\x\bx_\bH_\bH   the  eight-bit  character  whose value is the hexadecimal
+                     value _\bH_\bH (one or two hex digits)
+
+       When entering the text of a macro, single or double  quotes  should  be
+       used  to indicate a macro definition.  Unquoted text is assumed to be a
+       function name.  In the macro  body,  the  backslash  escapes  described
+       above  are  expanded.   Backslash will quote any other character in the
        macro text, including " and '.
 
-       \e[1mBash  \e[22mallows the current readline key bindings to be displayed or modi-
-       fied with the \e[1mbind \e[22mbuiltin command.  The editing mode may  be  switched
-       during  interactive  use by using the \e[1m-o \e[22moption to the \e[1mset \e[22mbuiltin com-
-       mand.  Other programs using this library  provide  similar  mechanisms.
-       The  \e[4minputrc\e[24m  file may be edited and re-read if a program does not pro-
+       B\bBa\bas\bsh\bh allows the current readline key bindings to be displayed or  modi-
+       fied  with  the b\bbi\bin\bnd\bd builtin command.  The editing mode may be switched
+       during interactive use by using the -\b-o\bo option to the s\bse\bet\bt  builtin  com-
+       mand.   Other  programs  using this library provide similar mechanisms.
+       The _\bi_\bn_\bp_\bu_\bt_\br_\bc file may be edited and re-read if a program does  not  pro-
        vide any other means to incorporate new bindings.
 
-   \e[1mVariables\e[0m
+   V\bVa\bar\bri\bia\bab\bbl\ble\bes\bs
        Readline has variables that can be used to further customize its behav-
-       ior.  A variable may be set in the \e[4minputrc\e[24m file with a statement of the
+       ior.  A variable may be set in the _\bi_\bn_\bp_\bu_\bt_\br_\bc file with a statement of the
        form
 
-              \e[1mset \e[4m\e[22mvariable-name\e[24m \e[4mvalue\e[0m
+              s\bse\bet\bt _\bv_\ba_\br_\bi_\ba_\bb_\bl_\be_\b-_\bn_\ba_\bm_\be _\bv_\ba_\bl_\bu_\be
 
-       Except where noted, readline variables can take the values  \e[1mOn  \e[22mor  \e[1mOff\e[0m
-       (without  regard  to  case).   Unrecognized variable names are ignored.
-       When a variable value is read, empty or null values, "on"  (case-insen-
-       sitive), and "1" are equivalent to \e[1mOn\e[22m.  All other values are equivalent
-       to \e[1mOff\e[22m.  The variables and their default values are:
+       Except  where  noted,  readline variables can take the values O\bOn\bn or O\bOf\bff\bf
+       (without regard to case).  Unrecognized  variable  names  are  ignored.
+       When  a variable value is read, empty or null values, "on" (case-insen-
+       sitive), and "1" are equivalent to O\bOn\bn.  All other values are equivalent
+       to O\bOf\bff\bf.  The variables and their default values are:
 
-       \e[1mactive-region-start-color\e[0m
-              A string variable that controls the text  color  and  background
-              when  displaying the text in the active region (see the descrip-
-              tion of \e[1menable-active-region \e[22mbelow).  This string must not  take
+       a\bac\bct\bti\biv\bve\be-\b-r\bre\beg\bgi\bio\bon\bn-\b-s\bst\bta\bar\brt\bt-\b-c\bco\bol\blo\bor\br
+              A  string  variable  that controls the text color and background
+              when displaying the text in the active region (see the  descrip-
+              tion  of e\ben\bna\bab\bbl\ble\be-\b-a\bac\bct\bti\biv\bve\be-\b-r\bre\beg\bgi\bio\bon\bn below).  This string must not take
               up any physical character positions on the display, so it should
-              consist only of terminal escape sequences.  It is output to  the
-              terminal  before displaying the text in the active region.  This
-              variable is reset to the default  value  whenever  the  terminal
-              type  changes.   The  default  value is the string that puts the
-              terminal in standout mode, as obtained from the terminal's  ter-
+              consist  only of terminal escape sequences.  It is output to the
+              terminal before displaying the text in the active region.   This
+              variable  is  reset  to  the default value whenever the terminal
+              type changes.  The default value is the  string  that  puts  the
+              terminal  in standout mode, as obtained from the terminal's ter-
               minfo description.  A sample value might be "\e[01;33m".
-       \e[1mactive-region-end-color\e[0m
-              A  string  variable  that  "undoes"  the  effects  of \e[1mactive-re-\e[0m
-              \e[1mgion-start-color \e[22mand restores "normal" terminal display  appear-
-              ance  after  displaying  text in the active region.  This string
-              must not take up any physical character positions  on  the  dis-
-              play,  so  it  should consist only of terminal escape sequences.
-              It is output to the terminal after displaying the  text  in  the
-              active  region.   This  variable  is  reset to the default value
-              whenever the terminal type changes.  The default  value  is  the
-              string  that  restores  the  terminal from standout mode, as ob-
+       a\bac\bct\bti\biv\bve\be-\b-r\bre\beg\bgi\bio\bon\bn-\b-e\ben\bnd\bd-\b-c\bco\bol\blo\bor\br
+              A string  variable  that  "undoes"  the  effects  of  a\bac\bct\bti\biv\bve\be-\b-r\bre\be-\b-
+              g\bgi\bio\bon\bn-\b-s\bst\bta\bar\brt\bt-\b-c\bco\bol\blo\bor\br  and restores "normal" terminal display appear-
+              ance after displaying text in the active  region.   This  string
+              must  not  take  up any physical character positions on the dis-
+              play, so it should consist only of  terminal  escape  sequences.
+              It  is  output  to the terminal after displaying the text in the
+              active region.  This variable is  reset  to  the  default  value
+              whenever  the  terminal  type changes.  The default value is the
+              string that restores the terminal from  standout  mode,  as  ob-
               tained from the terminal's terminfo description.  A sample value
               might be "\e[0m".
-       \e[1mbell-style (audible)\e[0m
-              Controls  what  happens when readline wants to ring the terminal
-              bell.  If set to \e[1mnone\e[22m, readline never rings the bell.  If set to
-              \e[1mvisible\e[22m,  readline  uses a visible bell if one is available.  If
-              set to \e[1maudible\e[22m, readline attempts to ring the terminal's bell.
-       \e[1mbind-tty-special-chars (On)\e[0m
-              If set to \e[1mOn \e[22m(the default), readline attempts to bind  the  con-
-              trol  characters    treated  specially  by the kernel's terminal
-              driver to their readline equivalents.
-       \e[1mblink-matching-paren (Off)\e[0m
-              If set to \e[1mOn\e[22m, readline attempts to briefly move the cursor to an
+       b\bbe\bel\bll\bl-\b-s\bst\bty\byl\ble\be (\b(a\bau\bud\bdi\bib\bbl\ble\be)\b)
+              Controls what happens when readline wants to ring  the  terminal
+              bell.  If set to n\bno\bon\bne\be, readline never rings the bell.  If set to
+              v\bvi\bis\bsi\bib\bbl\ble\be, readline uses a visible bell if one is  available.   If
+              set to a\bau\bud\bdi\bib\bbl\ble\be, readline attempts to ring the terminal's bell.
+       b\bbi\bin\bnd\bd-\b-t\btt\bty\by-\b-s\bsp\bpe\bec\bci\bia\bal\bl-\b-c\bch\bha\bar\brs\bs (\b(O\bOn\bn)\b)
+              If  set  to O\bOn\bn (the default), readline attempts to bind the con-
+              trol characters that are treated specially by the kernel's  ter-
+              minal  driver to their readline equivalents.  These override the
+              default readline bindings described here.  Type "stty -a"  at  a
+              b\bba\bas\bsh\bh prompt to see your current terminal settings, including the
+              special control characters (usually c\bcc\bch\bha\bar\brs\bs).
+       b\bbl\bli\bin\bnk\bk-\b-m\bma\bat\btc\bch\bhi\bin\bng\bg-\b-p\bpa\bar\bre\ben\bn (\b(O\bOf\bff\bf)\b)
+              If set to O\bOn\bn, readline attempts to briefly move the cursor to an
               opening parenthesis when a closing parenthesis is inserted.
-       \e[1mcolored-completion-prefix (Off)\e[0m
-              If  set  to  \e[1mOn\e[22m, when listing completions, readline displays the
+       c\bco\bol\blo\bor\bre\bed\bd-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-p\bpr\bre\bef\bfi\bix\bx (\b(O\bOf\bff\bf)\b)
+              If  set  to  O\bOn\bn, when listing completions, readline displays the
               common prefix of the set of possible completions using a differ-
               ent  color.   The  color definitions are taken from the value of
-              the \e[1mLS_COLORS \e[22menvironment variable.  If there is a color defini-
-              tion  in \e[1m$LS_COLORS \e[22mfor the custom suffix "readline-colored-com-
+              the L\bLS\bS_\b_C\bCO\bOL\bLO\bOR\bRS\benvironment variable.  If there is a color defini-
+              tion  in $\b$L\bLS\bS_\b_C\bCO\bOL\bLO\bOR\bRS\bfor the custom suffix "readline-colored-com-
               pletion-prefix", readline uses this color for the common  prefix
               instead of its default.
-       \e[1mcolored-stats (Off)\e[0m
-              If  set to \e[1mOn\e[22m, readline displays possible completions using dif-
+       c\bco\bol\blo\bor\bre\bed\bd-\b-s\bst\bta\bat\bts\bs (\b(O\bOf\bff\bf)\b)
+              If  set to O\bOn\bn, readline displays possible completions using dif-
               ferent colors to indicate their file type.   The  color  defini-
-              tions  are  taken  from  the  value of the \e[1mLS_COLORS \e[22menvironment
+              tions  are  taken  from  the  value of the L\bLS\bS_\b_C\bCO\bOL\bLO\bOR\bRS\benvironment
               variable.
-       \e[1mcomment-begin (``#'')\e[0m
-              The string that is inserted in \e[1mvi \e[22mmode when  the  \e[1minsert-comment\e[0m
-              command is executed.  This command is bound to \e[1mM-# \e[22min emacs mode
-              and to \e[1m# \e[22min vi command mode.
-       \e[1mcompletion-display-width (-1)\e[0m
+       c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn (\b(`\b``\b`#\b#'\b''\b')\b)
+              The string that is inserted in v\bvi\bi mode when  the  i\bin\bns\bse\ber\brt\bt-\b-c\bco\bom\bmm\bme\ben\bnt\bt
+              command is executed.  This command is bound to M\bM-\b-#\bin emacs mode
+              and to #\bin vi command mode.
+       c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-d\bdi\bis\bsp\bpl\bla\bay\by-\b-w\bwi\bid\bdt\bth\bh (\b(-\b-1\b1)\b)
               The number of screen columns used to  display  possible  matches
               when  performing completion.  The value is ignored if it is less
               than 0 or greater than the terminal screen width.  A value of  0
               will  cause  matches  to be displayed one per line.  The default
               value is -1.
-       \e[1mcompletion-ignore-case (Off)\e[0m
-              If set to \e[1mOn\e[22m, readline performs filename matching and completion
+       c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-i\big\bgn\bno\bor\bre\be-\b-c\bca\bas\bse\be (\b(O\bOf\bff\bf)\b)
+              If set to O\bOn\bn, readline performs filename matching and completion
               in a case-insensitive fashion.
-       \e[1mcompletion-map-case (Off)\e[0m
-              If  set  to  \e[1mOn\e[22m, and \e[1mcompletion-ignore-case \e[22mis enabled, readline
-              treats hyphens (\e[4m-\e[24m) and underscores (\e[4m_\e[24m) as equivalent  when  per-
+       c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-m\bma\bap\bp-\b-c\bca\bas\bse\be (\b(O\bOf\bff\bf)\b)
+              If  set  to  O\bOn\bn, and c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-i\big\bgn\bno\bor\bre\be-\b-c\bca\bas\bse\bis enabled, readline
+              treats hyphens (_\b-) and underscores (_\b_) as equivalent  when  per-
               forming case-insensitive filename matching and completion.
-       \e[1mcompletion-prefix-display-length (0)\e[0m
+       c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-p\bpr\bre\bef\bfi\bix\bx-\b-d\bdi\bis\bsp\bpl\bla\bay\by-\b-l\ble\ben\bng\bgt\bth\bh (\b(0\b0)\b)
               The  length in characters of the common prefix of a list of pos-
               sible completions that is displayed without modification.   When
               set  to  a  value greater than zero, common prefixes longer than
               this value are replaced with an ellipsis when displaying  possi-
               ble completions.
-       \e[1mcompletion-query-items (100)\e[0m
+       c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-q\bqu\bue\ber\bry\by-\b-i\bit\bte\bem\bms\bs (\b(1\b10\b00\b0)\b)
               This  determines when the user is queried about viewing the num-
-              ber of possible completions generated  by  the  \e[1mpossible-comple-\e[0m
-              \e[1mtions  \e[22mcommand.  It may be set to any integer value greater than
+              ber of possible completions generated  by  the  p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\be-\b-
+              t\bti\bio\bon\bns\bs  command.  It may be set to any integer value greater than
               or equal to zero.  If the  number  of  possible  completions  is
               greater  than  or  equal to the value of this variable, readline
               will ask whether or not the user wishes to view them;  otherwise
               they are simply listed on the terminal.  A negative value causes
               readline to never ask.
-       \e[1mconvert-meta (On)\e[0m
-              If set to \e[1mOn\e[22m, readline will convert characters with  the  eighth
+       c\bco\bon\bnv\bve\ber\brt\bt-\b-m\bme\bet\bta\ba (\b(O\bOn\bn)\b)
+              If set to O\bOn\bn, readline will convert characters with  the  eighth
               bit set to an ASCII key sequence by stripping the eighth bit and
               prefixing it with an escape character (in effect,  using  escape
-              as  the  \e[4mmeta\e[24m \e[4mprefix\e[24m).  The default is \e[4mOn\e[24m, but readline will set
-              it to \e[4mOff\e[24m if the locale  contains  eight-bit  characters.   This
-              variable  is  dependent on the \e[1mLC_CTYPE \e[22mlocale category, and may
+              as  the  _\bm_\be_\bt_\ba _\bp_\br_\be_\bf_\bi_\bx).  The default is _\bO_\bn, but readline will set
+              it to _\bO_\bf_\bf if the locale  contains  eight-bit  characters.   This
+              variable  is  dependent on the L\bLC\bC_\b_C\bCT\bTY\bYP\bPE\blocale category, and may
               change if the locale is changed.
-       \e[1mdisable-completion (Off)\e[0m
-              If set to \e[1mOn\e[22m, readline will inhibit word completion.  Completion
+       d\bdi\bis\bsa\bab\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn (\b(O\bOf\bff\bf)\b)
+              If set to O\bOn\bn, readline will inhibit word completion.  Completion
               characters  will  be  inserted into the line as if they had been
-              mapped to \e[1mself-insert\e[22m.
-       \e[1mecho-control-characters (On)\e[0m
-              When set to \e[1mOn\e[22m, on operating systems that indicate they  support
+              mapped to s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt.
+       e\bec\bch\bho\bo-\b-c\bco\bon\bnt\btr\bro\bol\bl-\b-c\bch\bha\bar\bra\bac\bct\bte\ber\brs\bs (\b(O\bOn\bn)\b)
+              When set to O\bOn\bn, on operating systems that indicate they  support
               it, readline echoes a character corresponding to a signal gener-
               ated from the keyboard.
-       \e[1mediting-mode (emacs)\e[0m
+       e\bed\bdi\bit\bti\bin\bng\bg-\b-m\bmo\bod\bde\be (\b(e\bem\bma\bac\bcs\bs)\b)
               Controls whether readline begins with a set of key bindings sim-
-              ilar to \e[4mEmacs\e[24m or \e[4mvi\e[24m.  \e[1mediting-mode \e[22mcan be set to either \e[1memacs \e[22mor
-              \e[1mvi\e[22m.
-       \e[1memacs-mode-string (@)\e[0m
-              If the \e[4mshow-mode-in-prompt\e[24m variable is enabled, this  string  is
+              ilar to _\bE_\bm_\ba_\bc_\bs or _\bv_\bi.  e\bed\bdi\bit\bti\bin\bng\bg-\b-m\bmo\bod\bde\be can be set to either e\bem\bma\bac\bcs\bor
+              v\bvi\bi.
+       e\bem\bma\bac\bcs\bs-\b-m\bmo\bod\bde\be-\b-s\bst\btr\bri\bin\bng\bg (\b(@\b@)\b)
+              If the _\bs_\bh_\bo_\bw_\b-_\bm_\bo_\bd_\be_\b-_\bi_\bn_\b-_\bp_\br_\bo_\bm_\bp_\bt variable is enabled, this  string  is
               displayed immediately before the last line of the primary prompt
               when emacs editing mode is active.  The value is expanded like a
               key  binding,  so the standard set of meta- and control prefixes
@@ -282,667 +288,670 @@ READLINE(3)                Library Functions Manual                READLINE(3)
               escapes  to  begin and end sequences of non-printing characters,
               which can be used to embed a terminal control sequence into  the
               mode string.
-       \e[1menable-active-region (On)\e[0m
-              The  \e[4mpoint\e[24m  is the current cursor position, and \e[4mmark\e[24m refers to a
+       e\ben\bna\bab\bbl\ble\be-\b-a\bac\bct\bti\biv\bve\be-\b-r\bre\beg\bgi\bio\bon\bn (\b(O\bOn\bn)\b)
+              The  _\bp_\bo_\bi_\bn_\bt  is the current cursor position, and _\bm_\ba_\br_\bk refers to a
               saved cursor position.  The text between the point and  mark  is
-              referred  to  as  the  \e[4mregion\e[24m.  When this variable is set to \e[4mOn\e[24m,
-              readline allows certain commands to designate the region as  \e[4mac-\e[0m
-              \e[4mtive\e[24m.   When  the region is active, readline highlights the text
-              in the region using the value of the  \e[1mactive-region-start-color\e[22m,
+              referred  to  as  the  _\br_\be_\bg_\bi_\bo_\bn.  When this variable is set to _\bO_\bn,
+              readline allows certain commands to designate the region as  _\ba_\bc_\b-
+              _\bt_\bi_\bv_\be.   When  the region is active, readline highlights the text
+              in the region using the value of the  a\bac\bct\bti\biv\bve\be-\b-r\bre\beg\bgi\bio\bon\bn-\b-s\bst\bta\bar\brt\bt-\b-c\bco\bol\blo\bor\br,
               which  defaults to the string that enables the terminal's stand-
               out mode.  The active region shows the text inserted  by  brack-
               eted-paste  and  any matching text found by incremental and non-
               incremental history searches.
-       \e[1menable-bracketed-paste (On)\e[0m
-              When set to \e[1mOn\e[22m, readline configures the terminal to insert  each
+       e\ben\bna\bab\bbl\ble\be-\b-b\bbr\bra\bac\bck\bke\bet\bte\bed\bd-\b-p\bpa\bas\bst\bte\be (\b(O\bOn\bn)\b)
+              When set to O\bOn\bn, readline configures the terminal to insert  each
               paste  into the editing buffer as a single string of characters,
               instead of treating each character as if it had been  read  from
               the keyboard.  This prevents readline from executing any editing
               commands bound to key sequences appearing in the pasted text.
-       \e[1menable-keypad (Off)\e[0m
-              When set to \e[1mOn\e[22m, readline will try to enable the application key-
+       e\ben\bna\bab\bbl\ble\be-\b-k\bke\bey\byp\bpa\bad\bd (\b(O\bOf\bff\bf)\b)
+              When set to O\bOn\bn, readline will try to enable the application key-
               pad when it is called.  Some systems need this to enable the ar-
               row keys.
-       \e[1menable-meta-key (On)\e[0m
-              When set to \e[1mOn\e[22m, readline will try to enable  any  meta  modifier
+       e\ben\bna\bab\bbl\ble\be-\b-m\bme\bet\bta\ba-\b-k\bke\bey\by (\b(O\bOn\bn)\b)
+              When set to O\bOn\bn, readline will try to enable  any  meta  modifier
               key  the  terminal claims to support when it is called.  On many
               terminals, the meta key is used to send eight-bit characters.
-       \e[1mexpand-tilde (Off)\e[0m
-              If set to \e[1mOn\e[22m, tilde expansion is  performed  when  readline  at-
+       e\bex\bxp\bpa\ban\bnd\bd-\b-t\bti\bil\bld\bde\be (\b(O\bOf\bff\bf)\b)
+              If set to O\bOn\bn, tilde expansion is  performed  when  readline  at-
               tempts word completion.
-       \e[1mhistory-preserve-point (Off)\e[0m
-              If  set  to  \e[1mOn\e[22m, the history code attempts to place point at the
-              same location on each history line retrieved with  \e[1mprevious-his-\e[0m
-              \e[1mtory \e[22mor \e[1mnext-history\e[22m.
-       \e[1mhistory-size (unset)\e[0m
+       h\bhi\bis\bst\bto\bor\bry\by-\b-p\bpr\bre\bes\bse\ber\brv\bve\be-\b-p\bpo\boi\bin\bnt\bt (\b(O\bOf\bff\bf)\b)
+              If  set  to  O\bOn\bn, the history code attempts to place point at the
+              same location on each history line retrieved with  p\bpr\bre\bev\bvi\bio\bou\bus\bs-\b-h\bhi\bis\bs-\b-
+              t\bto\bor\bry\by or n\bne\bex\bxt\bt-\b-h\bhi\bis\bst\bto\bor\bry\by.
+       h\bhi\bis\bst\bto\bor\bry\by-\b-s\bsi\biz\bze\be (\b(u\bun\bns\bse\bet\bt)\b)
               Set  the  maximum number of history entries saved in the history
               list.  If set to zero, any existing history entries are  deleted
               and no new entries are saved.  If set to a value less than zero,
               the number of history entries is not limited.  By  default,  the
               number of history entries is not limited.  If an attempt is made
-              to set \e[4mhistory-size\e[24m to a non-numeric value, the  maximum  number
+              to set _\bh_\bi_\bs_\bt_\bo_\br_\by_\b-_\bs_\bi_\bz_\be to a non-numeric value, the  maximum  number
               of history entries will be set to 500.
-       \e[1mhorizontal-scroll-mode (Off)\e[0m
-              When  set  to  \e[1mOn\e[22m, makes readline use a single line for display,
+       h\bho\bor\bri\biz\bzo\bon\bnt\bta\bal\bl-\b-s\bsc\bcr\bro\bol\bll\bl-\b-m\bmo\bod\bde\be (\b(O\bOf\bff\bf)\b)
+              When  set  to  O\bOn\bn, makes readline use a single line for display,
               scrolling the input horizontally on a single screen line when it
               becomes  longer  than the screen width rather than wrapping to a
               new line.  This setting is automatically enabled  for  terminals
               of height 1.
-       \e[1minput-meta (Off)\e[0m
-              If  set to \e[1mOn\e[22m, readline will enable eight-bit input (that is, it
+       i\bin\bnp\bpu\but\bt-\b-m\bme\bet\bta\ba (\b(O\bOf\bff\bf)\b)
+              If  set to O\bOn\bn, readline will enable eight-bit input (that is, it
               will not clear the eighth bit in the characters it  reads),  re-
               gardless  of  what the terminal claims it can support.  The name
-              \e[1mmeta-flag \e[22mis a synonym for this variable.  The default  is  \e[4mOff\e[24m,
-              but  readline will set it to \e[4mOn\e[24m if the locale contains eight-bit
-              characters.  This variable is dependent on the  \e[1mLC_CTYPE  \e[22mlocale
+              m\bme\bet\bta\ba-\b-f\bfl\bla\bag\bg is a synonym for this variable.  The default  is  _\bO_\bf_\bf,
+              but  readline will set it to _\bO_\bn if the locale contains eight-bit
+              characters.  This variable is dependent on the  L\bLC\bC_\b_C\bCT\bTY\bYP\bPE\bE  locale
               category, and may change if the locale is changed.
-       \e[1misearch-terminators (``C-[ C-J'')\e[0m
+       i\bis\bse\bea\bar\brc\bch\bh-\b-t\bte\ber\brm\bmi\bin\bna\bat\bto\bor\brs\bs (\b(`\b``\b`C\bC-\b-[\b[ C\bC-\b-J\bJ'\b''\b')\b)
               The  string  of  characters that should terminate an incremental
               search without subsequently executing the character  as  a  com-
               mand.   If this variable has not been given a value, the charac-
-              ters \e[4mESC\e[24m and \e[4mC-J\e[24m will terminate an incremental search.
-       \e[1mkeymap (emacs)\e[0m
+              ters _\bE_\bS_\bC and _\bC_\b-_\bJ will terminate an incremental search.
+       k\bke\bey\bym\bma\bap\bp (\b(e\bem\bma\bac\bcs\bs)\b)
               Set the current readline keymap.  The set of legal keymap  names
-              is  \e[4memacs,\e[24m  \e[4memacs-standard,\e[24m \e[4memacs-meta,\e[24m \e[4memacs-ctlx,\e[24m \e[4mvi,\e[24m \e[4mvi-move,\e[0m
-              \e[4mvi-command\e[24m, and \e[4mvi-insert\e[24m.   \e[4mvi\e[24m  is  equivalent  to  \e[4mvi-command\e[24m;
-              \e[4memacs\e[24m  is  equivalent  to  \e[4memacs-standard\e[24m.  The default value is
-              \e[4memacs\e[24m.  The value  of  \e[1mediting-mode  \e[22malso  affects  the  default
+              is  _\be_\bm_\ba_\bc_\bs_\b,  _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bm_\be_\bt_\ba_\b, _\be_\bm_\ba_\bc_\bs_\b-_\bc_\bt_\bl_\bx_\b, _\bv_\bi_\b, _\bv_\bi_\b-_\bm_\bo_\bv_\be_\b,
+              _\bv_\bi_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd, and _\bv_\bi_\b-_\bi_\bn_\bs_\be_\br_\bt.   _\bv_\bi  is  equivalent  to  _\bv_\bi_\b-_\bc_\bo_\bm_\bm_\ba_\bn_\bd;
+              _\be_\bm_\ba_\bc_\bs  is  equivalent  to  _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd.  The default value is
+              _\be_\bm_\ba_\bc_\bs.  The value  of  e\bed\bdi\bit\bti\bin\bng\bg-\b-m\bmo\bod\bde\be  also  affects  the  default
               keymap.
-       \e[1mkeyseq-timeout (500)\e[0m
-              Specifies  the  duration \e[4mreadline\e[24m will wait for a character when
+       k\bke\bey\bys\bse\beq\bq-\b-t\bti\bim\bme\beo\bou\but\bt (\b(5\b50\b00\b0)\b)
+              Specifies  the  duration _\br_\be_\ba_\bd_\bl_\bi_\bn_\be will wait for a character when
               reading an ambiguous key sequence (one that can form a  complete
               key sequence using the input read so far, or can take additional
               input to complete a longer key sequence).  If no  input  is  re-
-              ceived  within  the  timeout,  \e[4mreadline\e[24m will use the shorter but
+              ceived  within  the  timeout,  _\br_\be_\ba_\bd_\bl_\bi_\bn_\be will use the shorter but
               complete key sequence.  The value is specified in  milliseconds,
-              so  a value of 1000 means that \e[4mreadline\e[24m will wait one second for
+              so  a value of 1000 means that _\br_\be_\ba_\bd_\bl_\bi_\bn_\be will wait one second for
               additional input.  If this variable is set to a value less  than
-              or  equal to zero, or to a non-numeric value, \e[4mreadline\e[24m will wait
+              or  equal to zero, or to a non-numeric value, _\br_\be_\ba_\bd_\bl_\bi_\bn_\be will wait
               until another key is pressed to decide  which  key  sequence  to
               complete.
-       \e[1mmark-directories (On)\e[0m
-              If set to \e[1mOn\e[22m, completed directory names have a slash appended.
-       \e[1mmark-modified-lines (Off)\e[0m
-              If  set  to  \e[1mOn\e[22m,  history lines that have been modified are dis-
-              played with a preceding asterisk (\e[1m*\e[22m).
-       \e[1mmark-symlinked-directories (Off)\e[0m
-              If set to \e[1mOn\e[22m, completed names which are symbolic links to direc-
-              tories  have  a slash appended (subject to the value of \e[1mmark-di-\e[0m
-              \e[1mrectories\e[22m).
-       \e[1mmatch-hidden-files (On)\e[0m
-              This variable, when set to \e[1mOn\e[22m, causes readline  to  match  files
+       m\bma\bar\brk\bk-\b-d\bdi\bir\bre\bec\bct\bto\bor\bri\bie\bes\bs (\b(O\bOn\bn)\b)
+              If set to O\bOn\bn, completed directory names have a slash appended.
+       m\bma\bar\brk\bk-\b-m\bmo\bod\bdi\bif\bfi\bie\bed\bd-\b-l\bli\bin\bne\bes\bs (\b(O\bOf\bff\bf)\b)
+              If  set  to  O\bOn\bn,  history lines that have been modified are dis-
+              played with a preceding asterisk (*\b*).
+       m\bma\bar\brk\bk-\b-s\bsy\bym\bml\bli\bin\bnk\bke\bed\bd-\b-d\bdi\bir\bre\bec\bct\bto\bor\bri\bie\bes\bs (\b(O\bOf\bff\bf)\b)
+              If set to O\bOn\bn, completed names which are symbolic links to direc-
+              tories  have  a slash appended (subject to the value of m\bma\bar\brk\bk-\b-d\bdi\bi-\b-
+              r\bre\bec\bct\bto\bor\bri\bie\bes\bs).
+       m\bma\bat\btc\bch\bh-\b-h\bhi\bid\bdd\bde\ben\bn-\b-f\bfi\bil\ble\bes\bs (\b(O\bOn\bn)\b)
+              This variable, when set to O\bOn\bn, causes readline  to  match  files
               whose  names  begin  with  a  `.' (hidden files) when performing
-              filename completion.  If set to \e[1mOff\e[22m, the  leading  `.'  must  be
+              filename completion.  If set to O\bOf\bff\bf, the  leading  `.'  must  be
               supplied by the user in the filename to be completed.
-       \e[1mmenu-complete-display-prefix (Off)\e[0m
-              If  set to \e[1mOn\e[22m, menu completion displays the common prefix of the
+       m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-d\bdi\bis\bsp\bpl\bla\bay\by-\b-p\bpr\bre\bef\bfi\bix\bx (\b(O\bOf\bff\bf)\b)
+              If  set to O\bOn\bn, menu completion displays the common prefix of the
               list of possible completions (which may be empty) before cycling
               through the list.
-       \e[1moutput-meta (Off)\e[0m
-              If  set  to \e[1mOn\e[22m, readline will display characters with the eighth
+       o\bou\but\btp\bpu\but\bt-\b-m\bme\bet\bta\ba (\b(O\bOf\bff\bf)\b)
+              If  set  to O\bOn\bn, readline will display characters with the eighth
               bit set directly rather than as a meta-prefixed escape sequence.
-              The default is \e[4mOff\e[24m, but readline will set it to \e[4mOn\e[24m if the locale
+              The default is _\bO_\bf_\bf, but readline will set it to _\bO_\bn if the locale
               contains eight-bit characters.  This variable  is  dependent  on
-              the  \e[1mLC_CTYPE  \e[22mlocale  category, and may change if the locale is
+              the  L\bLC\bC_\b_C\bCT\bTY\bYP\bPE\bE  locale  category, and may change if the locale is
               changed.
-       \e[1mpage-completions (On)\e[0m
-              If set to \e[1mOn\e[22m, readline uses an internal \e[4mmore\e[24m-like pager to  dis-
+       p\bpa\bag\bge\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(O\bOn\bn)\b)
+              If set to O\bOn\bn, readline uses an internal _\bm_\bo_\br_\be-like pager to  dis-
               play a screenful of possible completions at a time.
-       \e[1mprint-completions-horizontally (Off)\e[0m
-              If  set  to  \e[1mOn\e[22m,  readline will display completions with matches
+       p\bpr\bri\bin\bnt\bt-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs-\b-h\bho\bor\bri\biz\bzo\bon\bnt\bta\bal\bll\bly\by (\b(O\bOf\bff\bf)\b)
+              If  set  to  O\bOn\bn,  readline will display completions with matches
               sorted horizontally in alphabetical order, rather than down  the
               screen.
-       \e[1mrevert-all-at-newline (Off)\e[0m
-              If  set  to  \e[1mOn\e[22m, readline will undo all changes to history lines
-              before returning when \e[1maccept-line \e[22mis executed.  By default, his-
+       r\bre\bev\bve\ber\brt\bt-\b-a\bal\bll\bl-\b-a\bat\bt-\b-n\bne\bew\bwl\bli\bin\bne\be (\b(O\bOf\bff\bf)\b)
+              If  set  to  O\bOn\bn, readline will undo all changes to history lines
+              before returning when a\bac\bcc\bce\bep\bpt\bt-\b-l\bli\bin\bne\bis executed.  By default, his-
               tory  lines  may  be  modified  and retain individual undo lists
-              across calls to \e[1mreadline\e[22m.
-       \e[1mshow-all-if-ambiguous (Off)\e[0m
-              This alters the default behavior of  the  completion  functions.
-              If set to \e[1mOn\e[22m, words which have more than one possible completion
-              cause the matches to be listed immediately  instead  of  ringing
+              across calls to r\bre\bea\bad\bdl\bli\bin\bne\be.
+       s\bse\bea\bar\brc\bch\bh-\b-i\big\bgn\bno\bor\bre\be-\b-c\bca\bas\bse\be (\b(O\bOf\bff\bf)\b)
+              If set to O\bOn\bn, readline performs incremental and  non-incremental
+              history list searches in a case-insensitive fashion.
+       s\bsh\bho\bow\bw-\b-a\bal\bll\bl-\b-i\bif\bf-\b-a\bam\bmb\bbi\big\bgu\buo\bou\bus\bs (\b(O\bOf\bff\bf)\b)
+              This  alters  the  default behavior of the completion functions.
+              If set to O\bOn\bn, words which have more than one possible completion
+              cause  the  matches  to be listed immediately instead of ringing
               the bell.
-       \e[1mshow-all-if-unmodified (Off)\e[0m
-              This  alters the default behavior of the completion functions in
-              a fashion similar to \e[1mshow-all-if-ambiguous\e[22m.  If set to \e[1mOn\e[22m, words
-              which  have more than one possible completion without any possi-
-              ble partial completion (the possible completions don't  share  a
-              common  prefix)  cause  the matches to be listed immediately in-
+       s\bsh\bho\bow\bw-\b-a\bal\bll\bl-\b-i\bif\bf-\b-u\bun\bnm\bmo\bod\bdi\bif\bfi\bie\bed\bd (\b(O\bOf\bff\bf)\b)
+              This alters the default behavior of the completion functions  in
+              a fashion similar to s\bsh\bho\bow\bw-\b-a\bal\bll\bl-\b-i\bif\bf-\b-a\bam\bmb\bbi\big\bgu\buo\bou\bus\bs.  If set to O\bOn\bn, words
+              which have more than one possible completion without any  possi-
+              ble  partial  completion (the possible completions don't share a
+              common prefix) cause the matches to be  listed  immediately  in-
               stead of ringing the bell.
-       \e[1mshow-mode-in-prompt (Off)\e[0m
-              If set to \e[1mOn\e[22m, add a string to the beginning of the prompt  indi-
-              cating  the  editing  mode:  emacs, vi command, or vi insertion.
-              The mode strings are user-settable (e.g., \e[4memacs-mode-string\e[24m).
-       \e[1mskip-completed-text (Off)\e[0m
-              If set to \e[1mOn\e[22m, this alters the default completion  behavior  when
-              inserting  a  single match into the line.  It's only active when
-              performing completion in the middle  of  a  word.   If  enabled,
-              readline  does  not  insert  characters from the completion that
-              match characters after point in the  word  being  completed,  so
+       s\bsh\bho\bow\bw-\b-m\bmo\bod\bde\be-\b-i\bin\bn-\b-p\bpr\bro\bom\bmp\bpt\bt (\b(O\bOf\bff\bf)\b)
+              If  set to O\bOn\bn, add a string to the beginning of the prompt indi-
+              cating the editing mode: emacs, vi  command,  or  vi  insertion.
+              The mode strings are user-settable (e.g., _\be_\bm_\ba_\bc_\bs_\b-_\bm_\bo_\bd_\be_\b-_\bs_\bt_\br_\bi_\bn_\bg).
+       s\bsk\bki\bip\bp-\b-c\bco\bom\bmp\bpl\ble\bet\bte\bed\bd-\b-t\bte\bex\bxt\bt (\b(O\bOf\bff\bf)\b)
+              If  set  to O\bOn\bn, this alters the default completion behavior when
+              inserting a single match into the line.  It's only  active  when
+              performing  completion  in  the  middle  of a word.  If enabled,
+              readline does not insert characters  from  the  completion  that
+              match  characters  after  point  in the word being completed, so
               portions of the word following the cursor are not duplicated.
-       \e[1mvi-cmd-mode-string ((cmd))\e[0m
-              If  the  \e[4mshow-mode-in-prompt\e[24m variable is enabled, this string is
+       v\bvi\bi-\b-c\bcm\bmd\bd-\b-m\bmo\bod\bde\be-\b-s\bst\btr\bri\bin\bng\bg (\b((\b(c\bcm\bmd\bd)\b))\b)
+              If the _\bs_\bh_\bo_\bw_\b-_\bm_\bo_\bd_\be_\b-_\bi_\bn_\b-_\bp_\br_\bo_\bm_\bp_\bt variable is enabled, this  string  is
               displayed immediately before the last line of the primary prompt
-              when  vi  editing mode is active and in command mode.  The value
+              when vi editing mode is active and in command mode.   The  value
               is expanded like a key binding, so the standard set of meta- and
-              control  prefixes  and  backslash escape sequences is available.
-              Use the \1 and \2 escapes to begin and  end  sequences  of  non-
-              printing  characters, which can be used to embed a terminal con-
+              control prefixes and backslash escape  sequences  is  available.
+              Use  the  \1  and  \2 escapes to begin and end sequences of non-
+              printing characters, which can be used to embed a terminal  con-
               trol sequence into the mode string.
-       \e[1mvi-ins-mode-string ((ins))\e[0m
-              If the \e[4mshow-mode-in-prompt\e[24m variable is enabled, this  string  is
+       v\bvi\bi-\b-i\bin\bns\bs-\b-m\bmo\bod\bde\be-\b-s\bst\btr\bri\bin\bng\bg (\b((\b(i\bin\bns\bs)\b))\b)
+              If  the  _\bs_\bh_\bo_\bw_\b-_\bm_\bo_\bd_\be_\b-_\bi_\bn_\b-_\bp_\br_\bo_\bm_\bp_\bt variable is enabled, this string is
               displayed immediately before the last line of the primary prompt
               when vi editing mode is active and in insertion mode.  The value
               is expanded like a key binding, so the standard set of meta- and
-              control prefixes and backslash escape  sequences  is  available.
-              Use  the  \1  and  \2 escapes to begin and end sequences of non-
-              printing characters, which can be used to embed a terminal  con-
+              control  prefixes  and  backslash escape sequences is available.
+              Use the \1 and \2 escapes to begin and  end  sequences  of  non-
+              printing  characters, which can be used to embed a terminal con-
               trol sequence into the mode string.
-       \e[1mvisible-stats (Off)\e[0m
-              If  set to \e[1mOn\e[22m, a character denoting a file's type as reported by
-              \e[4mstat\e[24m(2) is appended to the filename when listing  possible  com-
+       v\bvi\bis\bsi\bib\bbl\ble\be-\b-s\bst\bta\bat\bts\bs (\b(O\bOf\bff\bf)\b)
+              If set to O\bOn\bn, a character denoting a file's type as reported  by
+              _\bs_\bt_\ba_\bt(2)  is  appended to the filename when listing possible com-
               pletions.
 
-   \e[1mConditional Constructs\e[0m
-       Readline  implements  a  facility  similar in spirit to the conditional
-       compilation features of the C preprocessor which  allows  key  bindings
-       and  variable  settings  to be performed as the result of tests.  There
+   C\bCo\bon\bnd\bdi\bit\bti\bio\bon\bna\bal\bl C\bCo\bon\bns\bst\btr\bru\buc\bct\bts\bs
+       Readline implements a facility similar in  spirit  to  the  conditional
+       compilation  features  of  the C preprocessor which allows key bindings
+       and variable settings to be performed as the result  of  tests.   There
        are four parser directives used.
 
-       \e[1m$if    \e[22mThe \e[1m$if \e[22mconstruct allows bindings to be made based on the  edit-
-              ing  mode,  the  terminal  being  used, or the application using
-              readline.  The text of the test, after any comparison  operator,
+       $\b$i\bif\bf    The  $\b$i\bif\bf construct allows bindings to be made based on the edit-
+              ing mode, the terminal being  used,  or  the  application  using
+              readline.   The text of the test, after any comparison operator,
               extends to the end of the line; unless otherwise noted, no char-
               acters are required to isolate it.
 
-              \e[1mmode   \e[22mThe \e[1mmode= \e[22mform of the  \e[1m$if  \e[22mdirective  is  used  to  test
-                     whether  readline  is  in  emacs or vi mode.  This may be
-                     used in conjunction with the \e[1mset keymap \e[22mcommand, for  in-
-                     stance,  to set bindings in the \e[4memacs-standard\e[24m and \e[4memacs-\e[0m
-                     \e[4mctlx\e[24m keymaps only if readline is starting  out  in  emacs
+              m\bmo\bod\bde\be   The  m\bmo\bod\bde\be=\b=  form  of  the  $\b$i\bif\bf  directive is used to test
+                     whether readline is in emacs or vi  mode.   This  may  be
+                     used  in conjunction with the s\bse\bet\bt k\bke\bey\bym\bma\bap\bp command, for in-
+                     stance, to set bindings in the _\be_\bm_\ba_\bc_\bs_\b-_\bs_\bt_\ba_\bn_\bd_\ba_\br_\bd and  _\be_\bm_\ba_\bc_\bs_\b-
+                     _\bc_\bt_\bl_\bx  keymaps  only  if readline is starting out in emacs
                      mode.
 
-              \e[1mterm   \e[22mThe  \e[1mterm=  \e[22mform may be used to include terminal-specific
+              t\bte\ber\brm\bm   The t\bte\ber\brm\bm=\b= form may be used to  include  terminal-specific
                      key bindings, perhaps to bind the key sequences output by
                      the terminal's function keys.  The word on the right side
-                     of the \e[1m= \e[22mis tested against the full name of the  terminal
-                     and  the portion of the terminal name before the first \e[1m-\e[22m.
-                     This allows \e[4msun\e[24m to match both \e[4msun\e[24m and  \e[4msun-cmd\e[24m,  for  in-
+                     of  the =\b= is tested against the full name of the terminal
+                     and the portion of the terminal name before the first  -\b-.
+                     This  allows  _\bs_\bu_\bn  to match both _\bs_\bu_\bn and _\bs_\bu_\bn_\b-_\bc_\bm_\bd, for in-
                      stance.
 
-              \e[1mversion\e[0m
-                     The  \e[1mversion  \e[22mtest  may  be  used  to perform comparisons
-                     against specific readline versions.  The \e[1mversion  \e[22mexpands
-                     to  the  current readline version.  The set of comparison
-                     operators includes \e[1m=\e[22m, (and \e[1m==\e[22m), \e[1m!=\e[22m, \e[1m<=\e[22m,  \e[1m>=\e[22m,  \e[1m<\e[22m,  and  \e[1m>\e[22m.
-                     The  version number supplied on the right side of the op-
-                     erator consists of a major version  number,  an  optional
-                     decimal point, and an optional minor version (e.g., \e[1m7.1\e[22m).
-                     If the minor version is omitted, it is assumed to  be  \e[1m0\e[22m.
-                     The operator may be separated from the string \e[1mversion \e[22mand
+              v\bve\ber\brs\bsi\bio\bon\bn
+                     The v\bve\ber\brs\bsi\bio\bon\bn test  may  be  used  to  perform  comparisons
+                     against  specific readline versions.  The v\bve\ber\brs\bsi\bio\bon\bexpands
+                     to the current readline version.  The set  of  comparison
+                     operators  includes  =\b=,  (and  =\b==\b=), !\b!=\b=, <\b<=\b=, >\b>=\b=, <\b<, and >\b>.
+                     The version number supplied on the right side of the  op-
+                     erator  consists  of  a major version number, an optional
+                     decimal point, and an optional minor version (e.g., 7\b7.\b.1\b1).
+                     If  the  minor version is omitted, it is assumed to be 0\b0.
+                     The operator may be separated from the string v\bve\ber\brs\bsi\bio\bon\band
                      from the version number argument by whitespace.
 
-              \e[1mapplication\e[0m
-                     The \e[1mapplication \e[22mconstruct is used to include application-
-                     specific  settings.   Each program using the readline li-
-                     brary sets the \e[4mapplication\e[24m \e[4mname\e[24m,  and  an  initialization
+              a\bap\bpp\bpl\bli\bic\bca\bat\bti\bio\bon\bn
+                     The a\bap\bpp\bpl\bli\bic\bca\bat\bti\bio\bon\bconstruct is used to include application-
+                     specific settings.  Each program using the  readline  li-
+                     brary  sets  the  _\ba_\bp_\bp_\bl_\bi_\bc_\ba_\bt_\bi_\bo_\bn _\bn_\ba_\bm_\be, and an initialization
                      file can test for a particular value.  This could be used
-                     to bind key sequences to functions useful for a  specific
-                     program.   For instance, the following command adds a key
-                     sequence that quotes the  current  or  previous  word  in
-                     \e[1mbash\e[22m:
+                     to  bind key sequences to functions useful for a specific
+                     program.  For instance, the following command adds a  key
+                     sequence  that  quotes  the  current  or previous word in
+                     b\bba\bas\bsh\bh:
 
-                     \e[1m$if \e[22mBash
+                     $\b$i\bif\bBash
                      # Quote the current or previous word
                      "\C-xq": "\eb\"\ef\""
-                     \e[1m$endif\e[0m
+                     $\b$e\ben\bnd\bdi\bif\bf
 
-              \e[4mvariable\e[0m
-                     The \e[4mvariable\e[24m construct provides simple equality tests for
-                     readline variables and values.  The permitted  comparison
-                     operators  are  \e[4m=\e[24m, \e[4m==\e[24m, and \e[4m!=\e[24m.  The variable name must be
+              _\bv_\ba_\br_\bi_\ba_\bb_\bl_\be
+                     The _\bv_\ba_\br_\bi_\ba_\bb_\bl_\be construct provides simple equality tests for
+                     readline  variables and values.  The permitted comparison
+                     operators are _\b=, _\b=_\b=, and _\b!_\b=.  The variable name  must  be
                      separated from the comparison operator by whitespace; the
-                     operator  may  be  separated  from the value on the right
-                     hand side by whitespace.  Both string and  boolean  vari-
-                     ables  may  be  tested.  Boolean variables must be tested
-                     against the values \e[4mon\e[24m and \e[4moff\e[24m.
+                     operator may be separated from the  value  on  the  right
+                     hand  side  by whitespace.  Both string and boolean vari-
+                     ables may be tested. Boolean  variables  must  be  tested
+                     against the values _\bo_\bn and _\bo_\bf_\bf.
 
-       \e[1m$endif \e[22mThis command, as seen in the previous example, terminates an \e[1m$if\e[0m
+       $\b$e\ben\bnd\bdi\bif\bf This command, as seen in the previous example, terminates an $\b$i\bif\bf
               command.
 
-       \e[1m$else  \e[22mCommands in this branch of the \e[1m$if \e[22mdirective are executed if the
+       $\b$e\bel\bls\bse\be  Commands in this branch of the $\b$i\bif\bdirective are executed if the
               test fails.
 
-       \e[1m$include\e[0m
-              This directive takes a single filename as an argument and  reads
-              commands  and bindings from that file.  For example, the follow-
-              ing directive would read \e[4m/etc/inputrc\e[24m:
+       $\b$i\bin\bnc\bcl\blu\bud\bde\be
+              This  directive takes a single filename as an argument and reads
+              commands and bindings from that file.  For example, the  follow-
+              ing directive would read _\b/_\be_\bt_\bc_\b/_\bi_\bn_\bp_\bu_\bt_\br_\bc:
 
-              \e[1m$include  \e[4m\e[22m/etc/inputrc\e[0m
+              $\b$i\bin\bnc\bcl\blu\bud\bde\be  _\b/_\be_\bt_\bc_\b/_\bi_\bn_\bp_\bu_\bt_\br_\bc
 
-\e[1mSEARCHING\e[0m
-       Readline provides commands for searching through  the  command  history
-       for  lines  containing a specified string.  There are two search modes:
-       \e[4mincremental\e[24m and \e[4mnon-incremental\e[24m.
+S\bSE\bEA\bAR\bRC\bCH\bHI\bIN\bNG\bG
+       Readline  provides  commands  for searching through the command history
+       for lines containing a specified string.  There are two  search  modes:
+       _\bi_\bn_\bc_\br_\be_\bm_\be_\bn_\bt_\ba_\bl and _\bn_\bo_\bn_\b-_\bi_\bn_\bc_\br_\be_\bm_\be_\bn_\bt_\ba_\bl.
 
-       Incremental searches begin before the  user  has  finished  typing  the
-       search  string.  As each character of the search string is typed, read-
+       Incremental  searches  begin  before  the  user has finished typing the
+       search string.  As each character of the search string is typed,  read-
        line displays the next entry from the history matching the string typed
-       so  far.   An  incremental  search  requires only as many characters as
-       needed to find the desired history entry.  To search  backward  in  the
-       history for a particular string, type \e[1mC-r\e[22m.  Typing \e[1mC-s \e[22msearches forward
-       through the history.  The  characters  present  in  the  value  of  the
-       \e[1misearch-terminators  \e[22mvariable  are  used  to  terminate  an incremental
-       search.  If that variable has not been assigned a value the \e[4mEscape\e[24m  and
-       \e[1mC-J \e[22mcharacters will terminate an incremental search.  \e[1mC-G \e[22mwill abort an
-       incremental search and restore the original line.  When the  search  is
-       terminated,  the history entry containing the search string becomes the
+       so far.  An incremental search requires  only  as  many  characters  as
+       needed  to  find  the desired history entry.  To search backward in the
+       history for a particular string, type C\bC-\b-r\br.  Typing C\bC-\b-s\bsearches forward
+       through  the  history.   The  characters  present  in  the value of the
+       i\bis\bse\bea\bar\brc\bch\bh-\b-t\bte\ber\brm\bmi\bin\bna\bat\bto\bor\brs\bs variable  are  used  to  terminate  an  incremental
+       search.   If that variable has not been assigned a value the _\bE_\bs_\bc_\ba_\bp_\be and
+       C\bC-\b-J\bJ characters will terminate an incremental search.  C\bC-\b-G\bwill abort an
+       incremental  search  and restore the original line.  When the search is
+       terminated, the history entry containing the search string becomes  the
        current line.
 
-       To find other matching entries in the history list, type \e[1mC-s \e[22mor \e[1mC-r  \e[22mas
-       appropriate.   This  will search backward or forward in the history for
-       the next line matching the search string typed so far.  Any  other  key
+       To  find other matching entries in the history list, type C\bC-\b-s\bs or C\bC-\b-r\bas
+       appropriate.  This will search backward or forward in the  history  for
+       the  next  line matching the search string typed so far.  Any other key
        sequence bound to a readline command will terminate the search and exe-
-       cute that command.  For instance, a newline will terminate  the  search
-       and  accept  the  line,  thereby executing the command from the history
+       cute  that  command.  For instance, a newline will terminate the search
+       and accept the line, thereby executing the  command  from  the  history
        list.  A movement command will terminate the search, make the last line
        found the current line, and begin editing.
 
-       Non-incremental  searches read the entire search string before starting
-       to search for matching history lines.  The search string may  be  typed
+       Non-incremental searches read the entire search string before  starting
+       to  search  for matching history lines.  The search string may be typed
        by the user or be part of the contents of the current line.
 
-\e[1mEDITING COMMANDS\e[0m
-       The  following  is  a list of the names of the commands and the default
+E\bED\bDI\bIT\bTI\bIN\bNG\bG C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS
+       The following is a list of the names of the commands  and  the  default
        key sequences to which they are bound.  Command names without an accom-
        panying key sequence are unbound by default.
 
-       In the following descriptions, \e[4mpoint\e[24m refers to the current cursor posi-
-       tion, and \e[4mmark\e[24m refers to a cursor position saved by the  \e[1mset-mark  \e[22mcom-
-       mand.   The  text  between the point and mark is referred to as the \e[4mre-\e[0m
-       \e[4mgion\e[24m.
+       In the following descriptions, _\bp_\bo_\bi_\bn_\bt refers to the current cursor posi-
+       tion,  and  _\bm_\ba_\br_\bk refers to a cursor position saved by the s\bse\bet\bt-\b-m\bma\bar\brk\bcom-
+       mand.  The text between the point and mark is referred to  as  the  _\br_\be_\b-
+       _\bg_\bi_\bo_\bn.
 
-   \e[1mCommands for Moving\e[0m
-       \e[1mbeginning-of-line (C-a)\e[0m
+   C\bCo\bom\bmm\bma\ban\bnd\bds\bs f\bfo\bor\br M\bMo\bov\bvi\bin\bng\bg
+       b\bbe\beg\bgi\bin\bnn\bni\bin\bng\bg-\b-o\bof\bf-\b-l\bli\bin\bne\be (\b(C\bC-\b-a\ba)\b)
               Move to the start of the current line.
-       \e[1mend-of-line (C-e)\e[0m
+       e\ben\bnd\bd-\b-o\bof\bf-\b-l\bli\bin\bne\be (\b(C\bC-\b-e\be)\b)
               Move to the end of the line.
-       \e[1mforward-char (C-f)\e[0m
+       f\bfo\bor\brw\bwa\bar\brd\bd-\b-c\bch\bha\bar\br (\b(C\bC-\b-f\bf)\b)
               Move forward a character.
-       \e[1mbackward-char (C-b)\e[0m
+       b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-c\bch\bha\bar\br (\b(C\bC-\b-b\bb)\b)
               Move back a character.
-       \e[1mforward-word (M-f)\e[0m
+       f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-f\bf)\b)
               Move forward to the end of the next word.  Words are composed of
               alphanumeric characters (letters and digits).
-       \e[1mbackward-word (M-b)\e[0m
-              Move  back  to the start of the current or previous word.  Words
+       b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-b\bb)\b)
+              Move back to the start of the current or previous  word.   Words
               are composed of alphanumeric characters (letters and digits).
-       \e[1mprevious-screen-line\e[0m
-              Attempt to move point to the same physical screen column on  the
-              previous  physical  screen  line. This will not have the desired
-              effect if the current readline line does not take up  more  than
-              one  physical line or if point is not greater than the length of
+       p\bpr\bre\bev\bvi\bio\bou\bus\bs-\b-s\bsc\bcr\bre\bee\ben\bn-\b-l\bli\bin\bne\be
+              Attempt  to move point to the same physical screen column on the
+              previous physical screen line. This will not  have  the  desired
+              effect  if  the current readline line does not take up more than
+              one physical line or if point is not greater than the length  of
               the prompt plus the screen width.
-       \e[1mnext-screen-line\e[0m
-              Attempt to move point to the same physical screen column on  the
+       n\bne\bex\bxt\bt-\b-s\bsc\bcr\bre\bee\ben\bn-\b-l\bli\bin\bne\be
+              Attempt  to move point to the same physical screen column on the
               next physical screen line. This will not have the desired effect
-              if the current readline line does not  take  up  more  than  one
-              physical  line  or if the length of the current readline line is
+              if  the  current  readline  line  does not take up more than one
+              physical line or if the length of the current readline  line  is
               not greater than the length of the prompt plus the screen width.
-       \e[1mclear-display (M-C-l)\e[0m
-              Clear the screen and, if  possible,  the  terminal's  scrollback
-              buffer,  then  redraw the current line, leaving the current line
+       c\bcl\ble\bea\bar\br-\b-d\bdi\bis\bsp\bpl\bla\bay\by (\b(M\bM-\b-C\bC-\b-l\bl)\b)
+              Clear  the  screen  and,  if possible, the terminal's scrollback
+              buffer, then redraw the current line, leaving the  current  line
               at the top of the screen.
-       \e[1mclear-screen (C-l)\e[0m
+       c\bcl\ble\bea\bar\br-\b-s\bsc\bcr\bre\bee\ben\bn (\b(C\bC-\b-l\bl)\b)
               Clear the screen, then redraw the current line, leaving the cur-
-              rent  line  at the top of the screen.  With an argument, refresh
+              rent line at the top of the screen.  With an  argument,  refresh
               the current line without clearing the screen.
-       \e[1mredraw-current-line\e[0m
+       r\bre\bed\bdr\bra\baw\bw-\b-c\bcu\bur\brr\bre\ben\bnt\bt-\b-l\bli\bin\bne\be
               Refresh the current line.
 
-   \e[1mCommands for Manipulating the History\e[0m
-       \e[1maccept-line (Newline, Return)\e[0m
+   C\bCo\bom\bmm\bma\ban\bnd\bds\bs f\bfo\bor\br M\bMa\ban\bni\bip\bpu\bul\bla\bat\bti\bin\bng\bg t\bth\bhe\be H\bHi\bis\bst\bto\bor\bry\by
+       a\bac\bcc\bce\bep\bpt\bt-\b-l\bli\bin\bne\be (\b(N\bNe\bew\bwl\bli\bin\bne\be,\b, R\bRe\bet\btu\bur\brn\bn)\b)
               Accept the line regardless of where the cursor is.  If this line
               is non-empty, it may be added to the history list for future re-
-              call with \e[1madd_history()\e[22m.  If the  line  is  a  modified  history
+              call  with  a\bad\bdd\bd_\b_h\bhi\bis\bst\bto\bor\bry\by(\b()\b).   If  the  line is a modified history
               line, the history line is restored to its original state.
-       \e[1mprevious-history (C-p)\e[0m
+       p\bpr\bre\bev\bvi\bio\bou\bus\bs-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(C\bC-\b-p\bp)\b)
               Fetch the previous command from the history list, moving back in
               the list.
-       \e[1mnext-history (C-n)\e[0m
-              Fetch the next command from the history list, moving forward  in
+       n\bne\bex\bxt\bt-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(C\bC-\b-n\bn)\b)
+              Fetch  the next command from the history list, moving forward in
               the list.
-       \e[1mbeginning-of-history (M-<)\e[0m
+       b\bbe\beg\bgi\bin\bnn\bni\bin\bng\bg-\b-o\bof\bf-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b-<\b<)\b)
               Move to the first line in the history.
-       \e[1mend-of-history (M->)\e[0m
-              Move  to  the end of the input history, i.e., the line currently
+       e\ben\bnd\bd-\b-o\bof\bf-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b->\b>)\b)
+              Move to the end of the input history, i.e., the  line  currently
               being entered.
-       \e[1moperate-and-get-next (C-o)\e[0m
+       o\bop\bpe\ber\bra\bat\bte\be-\b-a\ban\bnd\bd-\b-g\bge\bet\bt-\b-n\bne\bex\bxt\bt (\b(C\bC-\b-o\bo)\b)
               Accept the current line for return to the calling application as
-              if  a newline had been entered, and fetch the next line relative
+              if a newline had been entered, and fetch the next line  relative
               to the current line from the history for editing.  A numeric ar-
-              gument,  if supplied, specifies the history entry to use instead
+              gument, if supplied, specifies the history entry to use  instead
               of the current line.
-       \e[1mfetch-history\e[0m
-              With a numeric argument, fetch that entry from the history  list
+       f\bfe\bet\btc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by
+              With  a numeric argument, fetch that entry from the history list
               and make it the current line.  Without an argument, move back to
               the first entry in the history list.
-       \e[1mreverse-search-history (C-r)\e[0m
-              Search backward starting at the current  line  and  moving  `up'
-              through  the  history  as  necessary.   This  is  an incremental
+       r\bre\bev\bve\ber\brs\bse\be-\b-s\bse\bea\bar\brc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(C\bC-\b-r\br)\b)
+              Search  backward  starting  at  the current line and moving `up'
+              through the  history  as  necessary.   This  is  an  incremental
               search.
-       \e[1mforward-search-history (C-s)\e[0m
-              Search forward starting at the current line  and  moving  `down'
-              through  the  history  as  necessary.   This  is  an incremental
+       f\bfo\bor\brw\bwa\bar\brd\bd-\b-s\bse\bea\bar\brc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(C\bC-\b-s\bs)\b)
+              Search  forward  starting  at the current line and moving `down'
+              through the  history  as  necessary.   This  is  an  incremental
               search.
-       \e[1mnon-incremental-reverse-search-history (M-p)\e[0m
+       n\bno\bon\bn-\b-i\bin\bnc\bcr\bre\bem\bme\ben\bnt\bta\bal\bl-\b-r\bre\bev\bve\ber\brs\bse\be-\b-s\bse\bea\bar\brc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b-p\bp)\b)
               Search backward through the history starting at the current line
-              using  a  non-incremental  search  for  a string supplied by the
+              using a non-incremental search for  a  string  supplied  by  the
               user.
-       \e[1mnon-incremental-forward-search-history (M-n)\e[0m
-              Search forward  through  the  history  using  a  non-incremental
+       n\bno\bon\bn-\b-i\bin\bnc\bcr\bre\bem\bme\ben\bnt\bta\bal\bl-\b-f\bfo\bor\brw\bwa\bar\brd\bd-\b-s\bse\bea\bar\brc\bch\bh-\b-h\bhi\bis\bst\bto\bor\bry\by (\b(M\bM-\b-n\bn)\b)
+              Search  forward  through  the  history  using  a non-incremental
               search for a string supplied by the user.
-       \e[1mhistory-search-backward\e[0m
+       h\bhi\bis\bst\bto\bor\bry\by-\b-s\bse\bea\bar\brc\bch\bh-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd
               Search backward through the history for the string of characters
               between the start of the current line and the current cursor po-
-              sition  (the \e[4mpoint\e[24m).  The search string must match at the begin-
+              sition (the _\bp_\bo_\bi_\bn_\bt).  The search string must match at the  begin-
               ning of a history line.  This is a non-incremental search.
-       \e[1mhistory-search-forward\e[0m
-              Search forward through the history for the string of  characters
+       h\bhi\bis\bst\bto\bor\bry\by-\b-s\bse\bea\bar\brc\bch\bh-\b-f\bfo\bor\brw\bwa\bar\brd\bd
+              Search  forward through the history for the string of characters
               between the start of the current line and the point.  The search
               string must match at the beginning of a history line.  This is a
               non-incremental search.
-       \e[1mhistory-substring-search-backward\e[0m
+       h\bhi\bis\bst\bto\bor\bry\by-\b-s\bsu\bub\bbs\bst\btr\bri\bin\bng\bg-\b-s\bse\bea\bar\brc\bch\bh-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd
               Search backward through the history for the string of characters
               between the start of the current line and the current cursor po-
-              sition  (the  \e[4mpoint\e[24m).  The search string may match anywhere in a
+              sition (the _\bp_\bo_\bi_\bn_\bt).  The search string may match anywhere  in  a
               history line.  This is a non-incremental search.
-       \e[1mhistory-substring-search-forward\e[0m
-              Search forward through the history for the string of  characters
+       h\bhi\bis\bst\bto\bor\bry\by-\b-s\bsu\bub\bbs\bst\btr\bri\bin\bng\bg-\b-s\bse\bea\bar\brc\bch\bh-\b-f\bfo\bor\brw\bwa\bar\brd\bd
+              Search  forward through the history for the string of characters
               between the start of the current line and the point.  The search
-              string may match anywhere in a history line.  This is a  non-in-
+              string  may match anywhere in a history line.  This is a non-in-
               cremental search.
-       \e[1myank-nth-arg (M-C-y)\e[0m
-              Insert  the  first argument to the previous command (usually the
-              second word on the previous line) at point.  With an argument \e[4mn\e[24m,
-              insert  the \e[4mn\e[24mth word from the previous command (the words in the
-              previous command begin with word 0).  A  negative  argument  in-
-              serts  the  \e[4mn\e[24mth word from the end of the previous command.  Once
-              the argument \e[4mn\e[24m is computed, the argument is extracted as if  the
-              "!\e[4mn\e[24m" history expansion had been specified.
-       \e[1myank-last-arg (M-., M-_)\e[0m
-              Insert  the last argument to the previous command (the last word
+       y\bya\ban\bnk\bk-\b-n\bnt\bth\bh-\b-a\bar\brg\bg (\b(M\bM-\b-C\bC-\b-y\by)\b)
+              Insert the first argument to the previous command  (usually  the
+              second word on the previous line) at point.  With an argument _\bn,
+              insert the _\bnth word from the previous command (the words in  the
+              previous  command  begin  with word 0).  A negative argument in-
+              serts the _\bnth word from the end of the previous  command.   Once
+              the  argument _\bn is computed, the argument is extracted as if the
+              "!_\bn" history expansion had been specified.
+       y\bya\ban\bnk\bk-\b-l\bla\bas\bst\bt-\b-a\bar\brg\bg (\b(M\bM-\b-.\b.,\b, M\bM-\b-_\b_)\b)
+              Insert the last argument to the previous command (the last  word
               of the previous history entry).  With a numeric argument, behave
-              exactly  like  \e[1myank-nth-arg\e[22m.   Successive calls to \e[1myank-last-arg\e[0m
-              move back through the history list, inserting the last word  (or
-              the  word  specified  by the argument to the first call) of each
+              exactly like y\bya\ban\bnk\bk-\b-n\bnt\bth\bh-\b-a\bar\brg\bg.  Successive  calls  to  y\bya\ban\bnk\bk-\b-l\bla\bas\bst\bt-\b-a\bar\brg\bg
+              move  back through the history list, inserting the last word (or
+              the word specified by the argument to the first  call)  of  each
               line in turn.  Any numeric argument supplied to these successive
-              calls  determines  the direction to move through the history.  A
-              negative argument switches the  direction  through  the  history
+              calls determines the direction to move through the  history.   A
+              negative  argument  switches  the  direction through the history
               (back or forward).  The history expansion facilities are used to
-              extract the last argument, as if the "!$" history expansion  had
+              extract  the last argument, as if the "!$" history expansion had
               been specified.
 
-   \e[1mCommands for Changing Text\e[0m
-       \e[4mend-of-file\e[24m \e[1m(usually C-d)\e[0m
-              The  character  indicating  end-of-file  as set, for example, by
-              ``stty''.  If this character is read when there are  no  charac-
-              ters  on  the  line,  and point is at the beginning of the line,
-              readline interprets it as the end of input and returns \e[1mEOF\e[22m.
-       \e[1mdelete-char (C-d)\e[0m
+   C\bCo\bom\bmm\bma\ban\bnd\bds\bs f\bfo\bor\br C\bCh\bha\ban\bng\bgi\bin\bng\bg T\bTe\bex\bxt\bt
+       _\be_\bn_\bd_\b-_\bo_\bf_\b-_\bf_\bi_\bl_\be (\b(u\bus\bsu\bua\bal\bll\bly\by C\bC-\b-d\bd)\b)
+              The character indicating end-of-file as  set,  for  example,  by
+              _\bs_\bt_\bt_\by(1).  If this character is read when there are no characters
+              on the line, and point is at the beginning of the line, readline
+              interprets it as the end of input and returns E\bEO\bOF\bF.
+       d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br (\b(C\bC-\b-d\bd)\b)
               Delete the character at point.  If this function is bound to the
-              same character as the tty \e[1mEOF \e[22mcharacter, as \e[1mC-d \e[22mcommonly is, see
+              same character as the tty E\bEO\bOF\bF character, as C\bC-\b-d\bcommonly is, see
               above for the effects.
-       \e[1mbackward-delete-char (Rubout)\e[0m
-              Delete the character behind the cursor.  When  given  a  numeric
+       b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br (\b(R\bRu\bub\bbo\bou\but\bt)\b)
+              Delete  the  character  behind the cursor.  When given a numeric
               argument, save the deleted text on the kill ring.
-       \e[1mforward-backward-delete-char\e[0m
-              Delete  the  character under the cursor, unless the cursor is at
+       f\bfo\bor\brw\bwa\bar\brd\bd-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br
+              Delete the character under the cursor, unless the cursor  is  at
               the end of the line, in which case the character behind the cur-
               sor is deleted.
-       \e[1mquoted-insert (C-q, C-v)\e[0m
+       q\bqu\buo\bot\bte\bed\bd-\b-i\bin\bns\bse\ber\brt\bt (\b(C\bC-\b-q\bq,\b, C\bC-\b-v\bv)\b)
               Add the next character that you type to the line verbatim.  This
-              is how to insert characters like \e[1mC-q\e[22m, for example.
-       \e[1mtab-insert (M-TAB)\e[0m
+              is how to insert characters like C\bC-\b-q\bq, for example.
+       t\bta\bab\bb-\b-i\bin\bns\bse\ber\brt\bt (\b(M\bM-\b-T\bTA\bAB\bB)\b)
               Insert a tab character.
-       \e[1mself-insert (a, b, A, 1, !, ...)\e[0m
+       s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt (\b(a\ba,\b, b\bb,\b, A\bA,\b, 1\b1,\b, !\b!,\b, .\b..\b..\b.)\b)
               Insert the character typed.
-       \e[1mtranspose-chars (C-t)\e[0m
-              Drag the character before point forward over  the  character  at
-              point,  moving point forward as well.  If point is at the end of
-              the line, then this transposes the two characters before  point.
+       t\btr\bra\ban\bns\bsp\bpo\bos\bse\be-\b-c\bch\bha\bar\brs\bs (\b(C\bC-\b-t\bt)\b)
+              Drag  the  character  before point forward over the character at
+              point, moving point forward as well.  If point is at the end  of
+              the  line, then this transposes the two characters before point.
               Negative arguments have no effect.
-       \e[1mtranspose-words (M-t)\e[0m
-              Drag  the  word  before  point past the word after point, moving
-              point over that word as well.  If point is at  the  end  of  the
+       t\btr\bra\ban\bns\bsp\bpo\bos\bse\be-\b-w\bwo\bor\brd\bds\bs (\b(M\bM-\b-t\bt)\b)
+              Drag the word before point past the  word  after  point,  moving
+              point  over  that  word  as well.  If point is at the end of the
               line, this transposes the last two words on the line.
-       \e[1mupcase-word (M-u)\e[0m
-              Uppercase  the current (or following) word.  With a negative ar-
+       u\bup\bpc\bca\bas\bse\be-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-u\bu)\b)
+              Uppercase the current (or following) word.  With a negative  ar-
               gument, uppercase the previous word, but do not move point.
-       \e[1mdowncase-word (M-l)\e[0m
-              Lowercase the current (or following) word.  With a negative  ar-
+       d\bdo\bow\bwn\bnc\bca\bas\bse\be-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-l\bl)\b)
+              Lowercase  the current (or following) word.  With a negative ar-
               gument, lowercase the previous word, but do not move point.
-       \e[1mcapitalize-word (M-c)\e[0m
+       c\bca\bap\bpi\bit\bta\bal\bli\biz\bze\be-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-c\bc)\b)
               Capitalize the current (or following) word.  With a negative ar-
               gument, capitalize the previous word, but do not move point.
-       \e[1moverwrite-mode\e[0m
-              Toggle overwrite mode.  With an explicit positive numeric  argu-
+       o\bov\bve\ber\brw\bwr\bri\bit\bte\be-\b-m\bmo\bod\bde\be
+              Toggle  overwrite mode.  With an explicit positive numeric argu-
               ment, switches to overwrite mode.  With an explicit non-positive
               numeric argument, switches to insert mode.  This command affects
-              only  \e[1memacs \e[22mmode; \e[1mvi \e[22mmode does overwrite differently.  Each call
-              to \e[4mreadline()\e[24m starts in insert mode.  In overwrite mode, charac-
-              ters  bound to \e[1mself-insert \e[22mreplace the text at point rather than
-              pushing the text  to  the  right.   Characters  bound  to  \e[1mback-\e[0m
-              \e[1mward-delete-char  \e[22mreplace  the  character  before  point  with a
+              only e\bem\bma\bac\bcs\bs mode; v\bvi\bi mode does overwrite differently.  Each  call
+              to _\br_\be_\ba_\bd_\bl_\bi_\bn_\be_\b(_\b) starts in insert mode.  In overwrite mode, charac-
+              ters bound to s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt replace the text at point rather  than
+              pushing  the  text  to  the  right.   Characters  bound to b\bba\bac\bck\bk-\b-
+              w\bwa\bar\brd\bd-\b-d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br replace  the  character  before  point  with  a
               space.  By default, this command is unbound.
 
-   \e[1mKilling and Yanking\e[0m
-       \e[1mkill-line (C-k)\e[0m
+   K\bKi\bil\bll\bli\bin\bng\bg a\ban\bnd\bd Y\bYa\ban\bnk\bki\bin\bng\bg
+       k\bki\bil\bll\bl-\b-l\bli\bin\bne\be (\b(C\bC-\b-k\bk)\b)
               Kill the text from point to the end of the line.
-       \e[1mbackward-kill-line (C-x Rubout)\e[0m
+       b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-k\bki\bil\bll\bl-\b-l\bli\bin\bne\be (\b(C\bC-\b-x\bx R\bRu\bub\bbo\bou\but\bt)\b)
               Kill backward to the beginning of the line.
-       \e[1munix-line-discard (C-u)\e[0m
-              Kill backward from point to the  beginning  of  the  line.   The
+       u\bun\bni\bix\bx-\b-l\bli\bin\bne\be-\b-d\bdi\bis\bsc\bca\bar\brd\bd (\b(C\bC-\b-u\bu)\b)
+              Kill  backward  from  point  to  the beginning of the line.  The
               killed text is saved on the kill-ring.
-       \e[1mkill-whole-line\e[0m
-              Kill  all  characters on the current line, no matter where point
+       k\bki\bil\bll\bl-\b-w\bwh\bho\bol\ble\be-\b-l\bli\bin\bne\be
+              Kill all characters on the current line, no matter  where  point
               is.
-       \e[1mkill-word (M-d)\e[0m
-              Kill from point the end of  the  current  word,  or  if  between
-              words,  to  the  end  of the next word.  Word boundaries are the
-              same as those used by \e[1mforward-word\e[22m.
-       \e[1mbackward-kill-word (M-Rubout)\e[0m
-              Kill the word behind point.  Word boundaries  are  the  same  as
-              those used by \e[1mbackward-word\e[22m.
-       \e[1munix-word-rubout (C-w)\e[0m
-              Kill  the  word behind point, using white space as a word bound-
+       k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-d\bd)\b)
+              Kill  from  point  the  end  of  the current word, or if between
+              words, to the end of the next word.   Word  boundaries  are  the
+              same as those used by f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
+       b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-k\bki\bil\bll\bl-\b-w\bwo\bor\brd\bd (\b(M\bM-\b-R\bRu\bub\bbo\bou\but\bt)\b)
+              Kill  the  word  behind  point.  Word boundaries are the same as
+              those used by b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
+       u\bun\bni\bix\bx-\b-w\bwo\bor\brd\bd-\b-r\bru\bub\bbo\bou\but\bt (\b(C\bC-\b-w\bw)\b)
+              Kill the word behind point, using white space as a  word  bound-
               ary.  The killed text is saved on the kill-ring.
-       \e[1munix-filename-rubout\e[0m
-              Kill the word behind point, using  white  space  and  the  slash
-              character  as  the word boundaries.  The killed text is saved on
+       u\bun\bni\bix\bx-\b-f\bfi\bil\ble\ben\bna\bam\bme\be-\b-r\bru\bub\bbo\bou\but\bt
+              Kill  the  word  behind  point,  using white space and the slash
+              character as the word boundaries.  The killed text is  saved  on
               the kill-ring.
-       \e[1mdelete-horizontal-space (M-\)\e[0m
+       d\bde\bel\ble\bet\bte\be-\b-h\bho\bor\bri\biz\bzo\bon\bnt\bta\bal\bl-\b-s\bsp\bpa\bac\bce\be (\b(M\bM-\b-\\b\)\b)
               Delete all spaces and tabs around point.
-       \e[1mkill-region\e[0m
-              Kill the text between the point and  \e[4mmark\e[24m  (saved  cursor  posi-
-              tion).  This text is referred to as the \e[4mregion\e[24m.
-       \e[1mcopy-region-as-kill\e[0m
+       k\bki\bil\bll\bl-\b-r\bre\beg\bgi\bio\bon\bn
+              Kill  the  text  between  the point and _\bm_\ba_\br_\bk (saved cursor posi-
+              tion).  This text is referred to as the _\br_\be_\bg_\bi_\bo_\bn.
+       c\bco\bop\bpy\by-\b-r\bre\beg\bgi\bio\bon\bn-\b-a\bas\bs-\b-k\bki\bil\bll\bl
               Copy the text in the region to the kill buffer.
-       \e[1mcopy-backward-word\e[0m
-              Copy  the word before point to the kill buffer.  The word bound-
-              aries are the same as \e[1mbackward-word\e[22m.
-       \e[1mcopy-forward-word\e[0m
-              Copy the word following point to  the  kill  buffer.   The  word
-              boundaries are the same as \e[1mforward-word\e[22m.
-       \e[1myank (C-y)\e[0m
+       c\bco\bop\bpy\by-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd
+              Copy the word before point to the kill buffer.  The word  bound-
+              aries are the same as b\bba\bac\bck\bkw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
+       c\bco\bop\bpy\by-\b-f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd
+              Copy  the  word  following  point  to the kill buffer.  The word
+              boundaries are the same as f\bfo\bor\brw\bwa\bar\brd\bd-\b-w\bwo\bor\brd\bd.
+       y\bya\ban\bnk\bk (\b(C\bC-\b-y\by)\b)
               Yank the top of the kill ring into the buffer at point.
-       \e[1myank-pop (M-y)\e[0m
-              Rotate  the kill ring, and yank the new top.  Only works follow-
-              ing \e[1myank \e[22mor \e[1myank-pop\e[22m.
+       y\bya\ban\bnk\bk-\b-p\bpo\bop\bp (\b(M\bM-\b-y\by)\b)
+              Rotate the kill ring, and yank the new top.  Only works  follow-
+              ing y\bya\ban\bnk\bk or y\bya\ban\bnk\bk-\b-p\bpo\bop\bp.
 
-   \e[1mNumeric Arguments\e[0m
-       \e[1mdigit-argument (M-0, M-1, ..., M--)\e[0m
-              Add this digit to the argument already accumulating, or start  a
+   N\bNu\bum\bme\ber\bri\bic\bc A\bAr\brg\bgu\bum\bme\ben\bnt\bts\bs
+       d\bdi\big\bgi\bit\bt-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt (\b(M\bM-\b-0\b0,\b, M\bM-\b-1\b1,\b, .\b..\b..\b.,\b, M\bM-\b--\b-)\b)
+              Add  this digit to the argument already accumulating, or start a
               new argument.  M-- starts a negative argument.
-       \e[1muniversal-argument\e[0m
-              This  is another way to specify an argument.  If this command is
-              followed by one or more digits, optionally with a leading  minus
-              sign,  those digits define the argument.  If the command is fol-
-              lowed by digits, executing \e[1muniversal-argument \e[22magain ends the nu-
+       u\bun\bni\biv\bve\ber\brs\bsa\bal\bl-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bt
+              This is another way to specify an argument.  If this command  is
+              followed  by one or more digits, optionally with a leading minus
+              sign, those digits define the argument.  If the command is  fol-
+              lowed by digits, executing u\bun\bni\biv\bve\ber\brs\bsa\bal\bl-\b-a\bar\brg\bgu\bum\bme\ben\bnt\bagain ends the nu-
               meric argument, but is otherwise ignored.  As a special case, if
               this command is immediately followed by a character that is nei-
               ther a digit or minus sign, the argument count for the next com-
-              mand is multiplied by four.  The  argument  count  is  initially
-              one,  so  executing this function the first time makes the argu-
+              mand  is  multiplied  by  four.  The argument count is initially
+              one, so executing this function the first time makes  the  argu-
               ment count four, a second time makes the argument count sixteen,
               and so on.
 
-   \e[1mCompleting\e[0m
-       \e[1mcomplete (TAB)\e[0m
+   C\bCo\bom\bmp\bpl\ble\bet\bti\bin\bng\bg
+       c\bco\bom\bmp\bpl\ble\bet\bte\be (\b(T\bTA\bAB\bB)\b)
               Attempt to perform completion on the text before point.  The ac-
-              tual completion performed is  application-specific.   \e[1mBash\e[22m,  for
-              instance,  attempts  completion  treating the text as a variable
-              (if the text begins with \e[1m$\e[22m), username (if the text  begins  with
-              \e[1m~\e[22m),  hostname (if the text begins with \e[1m@\e[22m), or command (including
-              aliases and functions) in turn.  If none  of  these  produces  a
-              match,  filename  completion  is  attempted.   \e[1mGdb\e[22m, on the other
-              hand, allows completion of program functions and variables,  and
+              tual  completion  performed  is application-specific.  B\bBa\bas\bsh\bh, for
+              instance, attempts completion treating the text  as  a  variable
+              (if  the  text begins with $\b$), username (if the text begins with
+              ~\b~), hostname (if the text begins with @\b@), or command  (including
+              aliases  and  functions)  in  turn.  If none of these produces a
+              match, filename completion is  attempted.   G\bGd\bdb\bb,  on  the  other
+              hand,  allows completion of program functions and variables, and
               only attempts filename completion under certain circumstances.
-       \e[1mpossible-completions (M-?)\e[0m
-              List  the  possible  completions of the text before point.  When
+       p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(M\bM-\b-?\b?)\b)
+              List the possible completions of the text  before  point.   When
               displaying completions, readline sets the number of columns used
-              for  display to the value of \e[1mcompletion-display-width\e[22m, the value
-              of the environment variable \e[1mCOLUMNS\e[22m, or  the  screen  width,  in
+              for display to the value of c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bn-\b-d\bdi\bis\bsp\bpl\bla\bay\by-\b-w\bwi\bid\bdt\bth\bh, the  value
+              of  the  environment  variable  C\bCO\bOL\bLU\bUM\bMN\bNS\bS, or the screen width, in
               that order.
-       \e[1minsert-completions (M-*)\e[0m
-              Insert  all completions of the text before point that would have
-              been generated by \e[1mpossible-completions\e[22m.
-       \e[1mmenu-complete\e[0m
-              Similar to \e[1mcomplete\e[22m, but replaces the word to be completed  with
-              a  single match from the list of possible completions.  Repeated
-              execution of \e[1mmenu-complete \e[22msteps through the  list  of  possible
-              completions,  inserting  each  match in turn.  At the end of the
+       i\bin\bns\bse\ber\brt\bt-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs (\b(M\bM-\b-*\b*)\b)
+              Insert all completions of the text before point that would  have
+              been generated by p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs.
+       m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be
+              Similar  to c\bco\bom\bmp\bpl\ble\bet\bte\be, but replaces the word to be completed with
+              a single match from the list of possible completions.   Repeated
+              execution  of  m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be  steps through the list of possible
+              completions, inserting each match in turn.  At the  end  of  the
               list of completions, the bell is rung (subject to the setting of
-              \e[1mbell-style\e[22m) and the original text is restored.  An argument of \e[4mn\e[0m
-              moves \e[4mn\e[24m positions forward in the list of matches; a negative ar-
+              b\bbe\bel\bll\bl-\b-s\bst\bty\byl\ble\be) and the original text is restored.  An argument of _\bn
+              moves _\bn positions forward in the list of matches; a negative ar-
               gument may be used to move backward through the list.  This com-
-              mand is intended to be bound to \e[1mTAB\e[22m, but is unbound by default.
-       \e[1mmenu-complete-backward\e[0m
-              Identical to \e[1mmenu-complete\e[22m, but moves backward through the  list
-              of  possible  completions,  as if \e[1mmenu-complete \e[22mhad been given a
+              mand is intended to be bound to T\bTA\bAB\bB, but is unbound by default.
+       m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd
+              Identical  to m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be, but moves backward through the list
+              of possible completions, as if m\bme\ben\bnu\bu-\b-c\bco\bom\bmp\bpl\ble\bet\bte\be had  been  given  a
               negative argument.  This command is unbound by default.
-       \e[1mdelete-char-or-list\e[0m
-              Deletes the character under the cursor if not at  the  beginning
-              or  end  of  the  line (like \e[1mdelete-char\e[22m).  If at the end of the
-              line, behaves identically to \e[1mpossible-completions\e[22m.
-
-   \e[1mKeyboard Macros\e[0m
-       \e[1mstart-kbd-macro (C-x ()\e[0m
-              Begin saving the characters  typed  into  the  current  keyboard
+       d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br-\b-o\bor\br-\b-l\bli\bis\bst\bt
+              Deletes  the  character under the cursor if not at the beginning
+              or end of the line (like d\bde\bel\ble\bet\bte\be-\b-c\bch\bha\bar\br).  If at  the  end  of  the
+              line, behaves identically to p\bpo\bos\bss\bsi\bib\bbl\ble\be-\b-c\bco\bom\bmp\bpl\ble\bet\bti\bio\bon\bns\bs.
+
+   K\bKe\bey\byb\bbo\boa\bar\brd\bd M\bMa\bac\bcr\bro\bos\bs
+       s\bst\bta\bar\brt\bt-\b-k\bkb\bbd\bd-\b-m\bma\bac\bcr\bro\bo (\b(C\bC-\b-x\bx (\b()\b)
+              Begin  saving  the  characters  typed  into the current keyboard
               macro.
-       \e[1mend-kbd-macro (C-x ))\e[0m
+       e\ben\bnd\bd-\b-k\bkb\bbd\bd-\b-m\bma\bac\bcr\bro\bo (\b(C\bC-\b-x\bx )\b))\b)
               Stop saving the characters typed into the current keyboard macro
               and store the definition.
-       \e[1mcall-last-kbd-macro (C-x e)\e[0m
-              Re-execute the last keyboard macro defined, by making the  char-
+       c\bca\bal\bll\bl-\b-l\bla\bas\bst\bt-\b-k\bkb\bbd\bd-\b-m\bma\bac\bcr\bro\bo (\b(C\bC-\b-x\bx e\be)\b)
+              Re-execute  the last keyboard macro defined, by making the char-
               acters in the macro appear as if typed at the keyboard.
-       \e[1mprint-last-kbd-macro ()\e[0m
-              Print  the  last keyboard macro defined in a format suitable for
-              the \e[4minputrc\e[24m file.
+       p\bpr\bri\bin\bnt\bt-\b-l\bla\bas\bst\bt-\b-k\bkb\bbd\bd-\b-m\bma\bac\bcr\bro\bo (\b()\b)
+              Print the last keyboard macro defined in a format  suitable  for
+              the _\bi_\bn_\bp_\bu_\bt_\br_\bc file.
 
-   \e[1mMiscellaneous\e[0m
-       \e[1mre-read-init-file (C-x C-r)\e[0m
-              Read in the contents of the \e[4minputrc\e[24m file,  and  incorporate  any
+   M\bMi\bis\bsc\bce\bel\bll\bla\ban\bne\beo\bou\bus\bs
+       r\bre\be-\b-r\bre\bea\bad\bd-\b-i\bin\bni\bit\bt-\b-f\bfi\bil\ble\be (\b(C\bC-\b-x\bx C\bC-\b-r\br)\b)
+              Read  in  the  contents of the _\bi_\bn_\bp_\bu_\bt_\br_\bc file, and incorporate any
               bindings or variable assignments found there.
-       \e[1mabort (C-g)\e[0m
-              Abort  the  current editing command and ring the terminal's bell
-              (subject to the setting of \e[1mbell-style\e[22m).
-       \e[1mdo-lowercase-version (M-A, M-B, M-\e[4m\e[22mx\e[24m\e[1m, ...)\e[0m
-              If the metafied character \e[4mx\e[24m is uppercase, run the  command  that
+       a\bab\bbo\bor\brt\bt (\b(C\bC-\b-g\bg)\b)
+              Abort the current editing command and ring the  terminal's  bell
+              (subject to the setting of b\bbe\bel\bll\bl-\b-s\bst\bty\byl\ble\be).
+       d\bdo\bo-\b-l\blo\bow\bwe\ber\brc\bca\bas\bse\be-\b-v\bve\ber\brs\bsi\bio\bon\bn (\b(M\bM-\b-A\bA,\b, M\bM-\b-B\bB,\b, M\bM-\b-_\bx,\b, .\b..\b..\b.)\b)
+              If  the  metafied character _\bx is uppercase, run the command that
               is bound to the corresponding metafied lowercase character.  The
-              behavior is undefined if \e[4mx\e[24m is already lowercase.
-       \e[1mprefix-meta (ESC)\e[0m
-              Metafy the next character typed.  \e[1mESC f \e[22mis equivalent to \e[1mMeta-f\e[22m.
-       \e[1mundo (C-_, C-x C-u)\e[0m
+              behavior is undefined if _\bx is already lowercase.
+       p\bpr\bre\bef\bfi\bix\bx-\b-m\bme\bet\bta\ba (\b(E\bES\bSC\bC)\b)
+              Metafy the next character typed.  E\bES\bSC\bC f\bf is equivalent to M\bMe\bet\bta\ba-\b-f\bf.
+       u\bun\bnd\bdo\bo (\b(C\bC-\b-_\b_,\b, C\bC-\b-x\bx C\bC-\b-u\bu)\b)
               Incremental undo, separately remembered for each line.
-       \e[1mrevert-line (M-r)\e[0m
-              Undo all changes made to this line.  This is like executing  the
-              \e[1mundo  \e[22mcommand  enough  times  to  return the line to its initial
+       r\bre\bev\bve\ber\brt\bt-\b-l\bli\bin\bne\be (\b(M\bM-\b-r\br)\b)
+              Undo  all changes made to this line.  This is like executing the
+              u\bun\bnd\bdo\bo command enough times to return  the  line  to  its  initial
               state.
-       \e[1mtilde-expand (M-&)\e[0m
+       t\bti\bil\bld\bde\be-\b-e\bex\bxp\bpa\ban\bnd\bd (\b(M\bM-\b-&\b&)\b)
               Perform tilde expansion on the current word.
-       \e[1mset-mark (C-@, M-<space>)\e[0m
-              Set the mark to the point.  If a numeric argument  is  supplied,
+       s\bse\bet\bt-\b-m\bma\bar\brk\bk (\b(C\bC-\b-@\b@,\b, M\bM-\b-<\b<s\bsp\bpa\bac\bce\be>\b>)\b)
+              Set  the  mark to the point.  If a numeric argument is supplied,
               the mark is set to that position.
-       \e[1mexchange-point-and-mark (C-x C-x)\e[0m
-              Swap  the  point  with the mark.  The current cursor position is
-              set to the saved position, and the old cursor position is  saved
+       e\bex\bxc\bch\bha\ban\bng\bge\be-\b-p\bpo\boi\bin\bnt\bt-\b-a\ban\bnd\bd-\b-m\bma\bar\brk\bk (\b(C\bC-\b-x\bx C\bC-\b-x\bx)\b)
+              Swap the point with the mark.  The current  cursor  position  is
+              set  to the saved position, and the old cursor position is saved
               as the mark.
-       \e[1mcharacter-search (C-])\e[0m
+       c\bch\bha\bar\bra\bac\bct\bte\ber\br-\b-s\bse\bea\bar\brc\bch\bh (\b(C\bC-\b-]\b])\b)
               A character is read and point is moved to the next occurrence of
-              that character.  A negative argument searches for  previous  oc-
+              that  character.   A negative argument searches for previous oc-
               currences.
-       \e[1mcharacter-search-backward (M-C-])\e[0m
-              A  character  is  read and point is moved to the previous occur-
-              rence of that character.  A negative argument searches for  sub-
+       c\bch\bha\bar\bra\bac\bct\bte\ber\br-\b-s\bse\bea\bar\brc\bch\bh-\b-b\bba\bac\bck\bkw\bwa\bar\brd\bd (\b(M\bM-\b-C\bC-\b-]\b])\b)
+              A character is read and point is moved to  the  previous  occur-
+              rence  of that character.  A negative argument searches for sub-
               sequent occurrences.
-       \e[1mskip-csi-sequence\e[0m
-              Read  enough  characters to consume a multi-key sequence such as
-              those defined for keys like Home and End.  Such sequences  begin
+       s\bsk\bki\bip\bp-\b-c\bcs\bsi\bi-\b-s\bse\beq\bqu\bue\ben\bnc\bce\be
+              Read enough characters to consume a multi-key sequence  such  as
+              those  defined for keys like Home and End.  Such sequences begin
               with a Control Sequence Indicator (CSI), usually ESC-[.  If this
-              sequence is bound to "\[", keys producing  such  sequences  will
-              have  no  effect  unless explicitly bound to a readline command,
-              instead of inserting stray characters into the  editing  buffer.
+              sequence  is  bound  to "\[", keys producing such sequences will
+              have no effect unless explicitly bound to  a  readline  command,
+              instead  of  inserting stray characters into the editing buffer.
               This is unbound by default, but usually bound to ESC-[.
-       \e[1minsert-comment (M-#)\e[0m
-              Without  a  numeric  argument,  the  value  of the readline \e[1mcom-\e[0m
-              \e[1mment-begin \e[22mvariable is inserted at the beginning of the  current
+       i\bin\bns\bse\ber\brt\bt-\b-c\bco\bom\bmm\bme\ben\bnt\bt (\b(M\bM-\b-#\b#)\b)
+              Without a numeric argument,  the  value  of  the  readline  c\bco\bom\bm-\b-
+              m\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn  variable is inserted at the beginning of the current
               line.  If a numeric argument is supplied, this command acts as a
-              toggle: if the characters at the beginning of the  line  do  not
-              match  the value of \e[1mcomment-begin\e[22m, the value is inserted, other-
-              wise the characters in \e[1mcomment-begin \e[22mare deleted from the begin-
-              ning  of the line.  In either case, the line is accepted as if a
-              newline had been typed.   The  default  value  of  \e[1mcomment-begin\e[0m
-              makes  the  current line a shell comment.  If a numeric argument
+              toggle:  if  the  characters at the beginning of the line do not
+              match the value of c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn, the value is inserted,  other-
+              wise the characters in c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bare deleted from the begin-
+              ning of the line.  In either case, the line is accepted as if  a
+              newline  had  been  typed.   The  default value of c\bco\bom\bmm\bme\ben\bnt\bt-\b-b\bbe\beg\bgi\bin\bn
+              makes the current line a shell comment.  If a  numeric  argument
               causes the comment character to be removed, the line will be ex-
               ecuted by the shell.
-       \e[1mdump-functions\e[0m
-              Print  all  of the functions and their key bindings to the read-
+       d\bdu\bum\bmp\bp-\b-f\bfu\bun\bnc\bct\bti\bio\bon\bns\bs
+              Print all of the functions and their key bindings to  the  read-
               line output stream.  If a numeric argument is supplied, the out-
-              put  is  formatted  in such a way that it can be made part of an
-              \e[4minputrc\e[24m file.
-       \e[1mdump-variables\e[0m
-              Print all of the settable variables  and  their  values  to  the
-              readline  output stream.  If a numeric argument is supplied, the
+              put is formatted in such a way that it can be made  part  of  an
+              _\bi_\bn_\bp_\bu_\bt_\br_\bc file.
+       d\bdu\bum\bmp\bp-\b-v\bva\bar\bri\bia\bab\bbl\ble\bes\bs
+              Print  all  of  the  settable  variables and their values to the
+              readline output stream.  If a numeric argument is supplied,  the
               output is formatted in such a way that it can be made part of an
-              \e[4minputrc\e[24m file.
-       \e[1mdump-macros\e[0m
-              Print  all of the readline key sequences bound to macros and the
-              strings they output.  If a numeric  argument  is  supplied,  the
+              _\bi_\bn_\bp_\bu_\bt_\br_\bc file.
+       d\bdu\bum\bmp\bp-\b-m\bma\bac\bcr\bro\bos\bs
+              Print all of the readline key sequences bound to macros and  the
+              strings  they  output.   If  a numeric argument is supplied, the
               output is formatted in such a way that it can be made part of an
-              \e[4minputrc\e[24m file.
-       \e[1memacs-editing-mode (C-e)\e[0m
-              When in \e[1mvi \e[22mcommand mode, this causes a switch to  \e[1memacs  \e[22mediting
+              _\bi_\bn_\bp_\bu_\bt_\br_\bc file.
+       e\bem\bma\bac\bcs\bs-\b-e\bed\bdi\bit\bti\bin\bng\bg-\b-m\bmo\bod\bde\be (\b(C\bC-\b-e\be)\b)
+              When  in  v\bvi\bi command mode, this causes a switch to e\bem\bma\bac\bcs\bediting
               mode.
-       \e[1mvi-editing-mode (M-C-j)\e[0m
-              When  in  \e[1memacs \e[22mediting mode, this causes a switch to \e[1mvi \e[22mediting
+       v\bvi\bi-\b-e\bed\bdi\bit\bti\bin\bng\bg-\b-m\bmo\bod\bde\be (\b(M\bM-\b-C\bC-\b-j\bj)\b)
+              When in e\bem\bma\bac\bcs\bs editing mode, this causes a switch to  v\bvi\bi  editing
               mode.
 
-\e[1mDEFAULT KEY BINDINGS\e[0m
-       The following is a list of the default emacs and vi bindings.   Charac-
-       ters  with the eighth bit set are written as M-<character>, and are re-
-       ferred to as \e[4mmetafied\e[24m characters.  The printable ASCII  characters  not
-       mentioned  in  the  list  of  emacs  standard bindings are bound to the
-       \e[1mself-insert \e[22mfunction, which just inserts the given character  into  the
+D\bDE\bEF\bFA\bAU\bUL\bLT\bT K\bKE\bEY\bY B\bBI\bIN\bND\bDI\bIN\bNG\bGS\bS
+       The  following is a list of the default emacs and vi bindings.  Charac-
+       ters with the eighth bit set are written as M-<character>, and are  re-
+       ferred  to  as _\bm_\be_\bt_\ba_\bf_\bi_\be_\bd characters.  The printable ASCII characters not
+       mentioned in the list of emacs  standard  bindings  are  bound  to  the
+       s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt  function,  which just inserts the given character into the
        input line.  In vi insertion mode, all characters not specifically men-
-       tioned are bound to \e[1mself-insert\e[22m.  Characters assigned to signal genera-
-       tion by \e[4mstty\e[24m(1) or the terminal driver, such as C-Z or C-C, retain that
-       function.  Upper and lower case metafied characters are  bound  to  the
-       same  function in the emacs mode meta keymap.  The remaining characters
-       are unbound, which causes readline to ring the  bell  (subject  to  the
-       setting of the \e[1mbell-style \e[22mvariable).
-
-   \e[1mEmacs Mode\e[0m
+       tioned are bound to s\bse\bel\blf\bf-\b-i\bin\bns\bse\ber\brt\bt.  Characters assigned to signal genera-
+       tion by _\bs_\bt_\bt_\by(1) or the terminal driver, such as C-Z or C-C, retain that
+       function.   Upper  and  lower case metafied characters are bound to the
+       same function in the emacs mode meta keymap.  The remaining  characters
+       are  unbound,  which  causes  readline to ring the bell (subject to the
+       setting of the b\bbe\bel\bll\bl-\b-s\bst\bty\byl\ble\bvariable).
+
+   E\bEm\bma\bac\bcs\bs M\bMo\bod\bde\be
              Emacs Standard bindings
 
              "C-@"  set-mark
@@ -1034,8 +1043,7 @@ READLINE(3)                Library Functions Manual                READLINE(3)
              "C-XE"  call-last-kbd-macro
              "C-XC-?"  backward-kill-line
 
-
-   \e[1mVI Mode bindings\e[0m
+   V\bVI\bI M\bMo\bod\bde\be b\bbi\bin\bnd\bdi\bin\bng\bgs\bs
              VI Insert Mode functions
 
              "C-D"  vi-eof-maybe
@@ -1043,15 +1051,17 @@ READLINE(3)                Library Functions Manual                READLINE(3)
              "C-I"  complete
              "C-J"  accept-line
              "C-M"  accept-line
+             "C-N"  menu-complete
+             "C-P"  menu-complete-backward
              "C-R"  reverse-search-history
              "C-S"  forward-search-history
              "C-T"  transpose-chars
              "C-U"  unix-line-discard
              "C-V"  quoted-insert
-             "C-W"  unix-word-rubout
+             "C-W"  vi-unix-word-rubout
              "C-Y"  yank
              "C-["  vi-movement-mode
-             "C-_"  undo
+             "C-_"  vi-undo
              " " to "~"  self-insert
              "C-?"  backward-delete-char
 
@@ -1073,7 +1083,7 @@ READLINE(3)                Library Functions Manual                READLINE(3)
              "C-T"  transpose-chars
              "C-U"  unix-line-discard
              "C-V"  quoted-insert
-             "C-W"  unix-word-rubout
+             "C-W"  vi-unix-word-rubout
              "C-Y"  yank
              "C-_"  vi-undo
              " "  forward-char
@@ -1107,7 +1117,7 @@ READLINE(3)                Library Functions Manual                READLINE(3)
              "T"  vi-char-search
              "U"  revert-line
              "W"  vi-next-word
-             "X"  backward-delete-char
+             "X"  vi-rubout
              "Y"  vi-yank-to
              "\"  vi-complete
              "^"  vi-first-print
@@ -1122,7 +1132,7 @@ READLINE(3)                Library Functions Manual                READLINE(3)
              "h"  backward-char
              "i"  vi-insertion-mode
              "j"  next-history
-             "k"  prev-history
+             "k"  previous-history
              "l"  forward-char
              "m"  vi-set-mark
              "n"  vi-search-again
@@ -1137,39 +1147,39 @@ READLINE(3)                Library Functions Manual                READLINE(3)
              "|"  vi-column
              "~"  vi-change-case
 
-\e[1mSEE ALSO\e[0m
-       \e[4mThe\e[24m \e[4mGnu\e[24m \e[4mReadline\e[24m \e[4mLibrary\e[24m, Brian Fox and Chet Ramey
-       \e[4mThe\e[24m \e[4mGnu\e[24m \e[4mHistory\e[24m \e[4mLibrary\e[24m, Brian Fox and Chet Ramey
-       \e[4mbash\e[24m(1)
+S\bSE\bEE\bE A\bAL\bLS\bSO\bO
+       _\bT_\bh_\be _\bG_\bn_\bu _\bR_\be_\ba_\bd_\bl_\bi_\bn_\be _\bL_\bi_\bb_\br_\ba_\br_\by, Brian Fox and Chet Ramey
+       _\bT_\bh_\be _\bG_\bn_\bu _\bH_\bi_\bs_\bt_\bo_\br_\by _\bL_\bi_\bb_\br_\ba_\br_\by, Brian Fox and Chet Ramey
+       _\bb_\ba_\bs_\bh(1)
 
-\e[1mFILES\e[0m
-       \e[4m~/.inputrc\e[0m
-              Individual \e[1mreadline \e[22minitialization file
+F\bFI\bIL\bLE\bES\bS
+       _\b~_\b/_\b._\bi_\bn_\bp_\bu_\bt_\br_\bc
+              Individual r\bre\bea\bad\bdl\bli\bin\bne\binitialization file
 
-\e[1mAUTHORS\e[0m
+A\bAU\bUT\bTH\bHO\bOR\bRS\bS
        Brian Fox, Free Software Foundation
        bfox@gnu.org
 
        Chet Ramey, Case Western Reserve University
        chet.ramey@case.edu
 
-\e[1mBUG REPORTS\e[0m
-       If  you  find  a bug in \e[1mreadline, \e[22myou should report it.  But first, you
-       should make sure that it really is a bug, and that it  appears  in  the
-       latest version of the \e[1mreadline \e[22mlibrary that you have.
+B\bBU\bUG\bG R\bRE\bEP\bPO\bOR\bRT\bTS\bS
+       If you find a bug in r\bre\bea\bad\bdl\bli\bin\bne\be,\b, you should report it.   But  first,  you
+       should  make  sure  that it really is a bug, and that it appears in the
+       latest version of the r\bre\bea\bad\bdl\bli\bin\bne\blibrary that you have.
 
-       Once  you have determined that a bug actually exists, mail a bug report
-       to \e[4mbug-readline\e[24m@\e[4mgnu.org\e[24m.  If you have a fix, you are  welcome  to  mail
-       that  as  well!   Suggestions  and  `philosophical'  bug reports may be
-       mailed to  \e[4mbug-readline\e[24m@\e[4mgnu.org\e[24m  or  posted  to  the  Usenet  newsgroup
-       \e[1mgnu.bash.bug\e[22m.
+       Once you have determined that a bug actually exists, mail a bug  report
+       to  _\bb_\bu_\bg_\b-_\br_\be_\ba_\bd_\bl_\bi_\bn_\be@_\bg_\bn_\bu_\b._\bo_\br_\bg.   If  you have a fix, you are welcome to mail
+       that as well!  Suggestions  and  `philosophical'  bug  reports  may  be
+       mailed  to  _\bb_\bu_\bg_\b-_\br_\be_\ba_\bd_\bl_\bi_\bn_\be@_\bg_\bn_\bu_\b._\bo_\br_\bg  or  posted  to  the  Usenet newsgroup
+       g\bgn\bnu\bu.\b.b\bba\bas\bsh\bh.\b.b\bbu\bug\bg.
 
        Comments and bug reports concerning this manual page should be directed
-       to \e[4mchet.ramey@case.edu\e[24m.
+       to _\bc_\bh_\be_\bt_\b._\br_\ba_\bm_\be_\by_\b@_\bc_\ba_\bs_\be_\b._\be_\bd_\bu.
 
-\e[1mBUGS\e[0m
+B\bBU\bUG\bGS\bS
        It's too big and too slow.
 
 
 
-GNU Readline 8.2               2022 September 19                   READLINE(3)
+GNU Readline 8.3                2024 January 18                    READLINE(3)
index 9af32f7ba2d7e0b95e98ba76b4f0273146f82628..a6b06596eb6b01a5d005ceee3116c80dc98ecb69 100644 (file)
@@ -6,15 +6,22 @@
 .\"    Case Western Reserve University
 .\"    chet.ramey@case.edu
 .\"
-.\"    Last Change: Fri Jan  5 11:02:00 EST 2024
+.\"    Last Change: Thu Jan 18 11:05:44 EST 2024
 .\"
-.TH READLINE 3 "2024 January 5" "GNU Readline 8.3"
+.TH READLINE 3 "2024 January 18" "GNU Readline 8.3"
 .\"
 .\" File Name macro.  This used to be `.PN', for Path Name,
 .\" but Sun doesn't seem to like that very much.
 .\"
 .de FN
-\fI\|\\$1\|\fP
+\%\fI\|\\$1\|\fP
+..
+.de Q
+.ie \n(.g \(lq\\$1\(rq\\$2
+.el \{
+.  if t ``\\$1''\\$2
+.  if n "\\$1"\\$2
+.\}
 ..
 .SH NAME
 readline \- get a line from a user with editing
@@ -141,7 +148,7 @@ or
 .RS
 C\-Meta\-u: universal\-argument
 .RE
-.sp
+.LP
 into the
 .I inputrc
 would make M\-C\-u execute the readline command
@@ -179,7 +186,7 @@ whitespace between the name and the colon.
 When using the form \fBkeyname\fP:\^\fIfunction-name\fP or \fImacro\fP,
 .I keyname
 is the name of a key spelled out in English.  For example:
-.sp
+.PP
 .RS
 Control\-u: universal\-argument
 .br
@@ -199,8 +206,7 @@ and
 .I C\-o
 is bound to run the macro
 expressed on the right hand side (that is, to insert the text
-.if t \f(CW> output\fP
-.if n ``> output''
+.Q "> output"
 into the line).
 .PP
 In the second form, \fB"keyseq"\fP:\^\fIfunction\-name\fP or \fImacro\fP,
@@ -212,7 +218,7 @@ an entire key sequence may be specified by placing the sequence
 within double quotes.  Some GNU Emacs style key escapes can be
 used, as in the following example, but the symbolic character names
 are not recognized.
-.sp
+.PP
 .RS
 "\eC\-u": universal\-argument
 .br
@@ -231,8 +237,7 @@ is bound to the function
 and
 .I "ESC [ 1 1 \(ti"
 is bound to insert the text
-.if t \f(CWFunction Key 1\fP.
-.if n ``Function Key 1''.
+.Q "Function Key 1" .
 .PP
 The full set of GNU Emacs style escape sequences available when specifying
 key sequences is
@@ -352,19 +357,24 @@ It is output to the terminal before displaying the text in the active region.
 This variable is reset to the default value whenever the terminal type changes.
 The default value is the string that puts the terminal in standout mode,
 as obtained from the terminal's terminfo description.
-A sample value might be \f(CW"\ee[01;33m"\fP.
+A sample value might be
+.Q "\ee[01;33m" .
 .TP
 .B active\-region\-end\-color
-A string variable that "undoes" the effects of \fBactive\-region\-start\-color\fP
-and restores "normal" terminal display appearance after displaying text
-in the active region.
+A string variable that
+.Q undoes
+the effects of \fBactive\-region\-start\-color\fP
+and restores
+.Q normal
+terminal display appearance after displaying text in the active region.
 This string must not take up any physical character positions on the display,
 so it should consist only of terminal escape sequences.
 It is output to the terminal after displaying the text in the active region.
 This variable is reset to the default value whenever the terminal type changes.
 The default value is the string that restores the terminal from standout mode,
 as obtained from the terminal's terminfo description.
-A sample value might be \f(CW"\ee[0m\fP".
+A sample value might be
+.Q "\ee[0m" .
 .TP
 .B bell\-style (audible)
 Controls what happens when readline wants to ring the terminal bell.
@@ -378,7 +388,9 @@ characters that are
 treated specially by the kernel's terminal driver to their
 readline equivalents.
 These override the default readline bindings described here.
-Type \f(CWstty -a\fP at a bash prompt to see your current terminal settings,
+Type
+.Q "stty -a"
+at a \fBbash\fP prompt to see your current terminal settings,
 including the special control characters (usually \fBcchars\fP).
 .TP
 .B blink\-matching\-paren (Off)
@@ -391,7 +403,8 @@ common prefix of the set of possible completions using a different color.
 The color definitions are taken from the value of the \fBLS_COLORS\fP
 environment variable.
 If there is a color definition in \fB$LS_COLORS\fP for the custom suffix
-"readline-colored-completion-prefix", readline uses this color for
+.Q readline-colored-completion-prefix ,
+readline uses this color for
 the common prefix instead of its default.
 .TP
 .B colored\-stats (Off)
@@ -752,7 +765,7 @@ file can test for a particular value.
 This could be used to bind key sequences to functions useful for
 a specific program.  For instance, the following command adds a
 key sequence that quotes the current or previous word in \fBbash\fP:
-.sp 1
+.PP
 .RS
 .nf
 \fB$if\fP Bash
@@ -781,8 +794,8 @@ the test fails.
 This directive takes a single filename as an argument and reads commands
 and bindings from that file.  For example, the following directive
 would read \fI/etc/inputrc\fP:
-.sp 1
 .RS
+.PP
 .nf
 \fB$include\fP \^ \fI/etc/inputrc\fP
 .fi 
@@ -977,7 +990,9 @@ insert the \fIn\fPth word from the previous command (the words
 in the previous command begin with word 0).  A negative argument
 inserts the \fIn\fPth word from the end of the previous command.
 Once the argument \fIn\fP is computed, the argument is extracted
-as if the "!\fIn\fP" history expansion had been specified.
+as if the
+.Q !\fIn\fP
+history expansion had been specified.
 .TP
 .B
 yank\-last\-arg (M\-.\^, M\-_\^)
@@ -991,15 +1006,16 @@ Any numeric argument supplied to these successive calls determines
 the direction to move through the history.  A negative argument switches
 the direction through the history (back or forward).
 The history expansion facilities are used to extract the last argument,
-as if the "!$" history expansion had been specified.
+as if the
+.Q !$
+history expansion had been specified.
 .PD
 .SS Commands for Changing Text
 .PD 0
 .TP
 .B \fIend\-of\-file\fP (usually C\-d)
 The character indicating end-of-file as set, for example, by
-.if t \f(CWstty\fP.
-.if n ``stty''.
+.IR stty (1).
 If this character is read when there are no characters
 on the line, and point is at the beginning of the line, readline
 interprets it as the end of input and returns
@@ -1280,7 +1296,9 @@ character.  A negative argument searches for subsequent occurrences.
 Read enough characters to consume a multi-key sequence such as those
 defined for keys like Home and End.  Such sequences begin with a
 Control Sequence Indicator (CSI), usually ESC\-[.  If this sequence is
-bound to "\e[", keys producing such sequences will have no effect
+bound to
+.Q \e[ ,
+keys producing such sequences will have no effect
 unless explicitly bound to a readline command, instead of inserting
 stray characters into the editing buffer.  This is unbound by default,
 but usually bound to ESC\-[.
@@ -1363,7 +1381,7 @@ variable).
 .ta 2.5i
 .sp
 Emacs Standard bindings
-.sp
+.PP
 "C-@"  set-mark
 "C-A"  beginning-of-line
 "C-B"  backward-char
@@ -1395,7 +1413,7 @@ Emacs Standard bindings
 "C-?"  backward-delete-char
 .PP
 Emacs Meta bindings
-.sp
+.PP
 "M-C-G"  abort
 "M-C-H"  backward-kill-word
 "M-C-I"  tab-insert
@@ -1443,7 +1461,7 @@ Emacs Meta bindings
 "M-_"  yank-last-arg
 .PP
 Emacs Control-X bindings
-.sp
+.PP
 "C-XC-G"  abort
 "C-XC-R"  re-read-init-file
 "C-XC-U"  undo
@@ -1452,16 +1470,14 @@ Emacs Control-X bindings
 "C-X)"  end-kbd-macro
 "C-XE"  call-last-kbd-macro
 "C-XC-?"  backward-kill-line
-.sp
 .RE
 .SS VI Mode bindings
 .RS +.6i
 .nf
 .ta 2.5i
-.sp
 .PP
 VI Insert Mode functions
-.sp
+.PP
 "C-D"  vi-eof-maybe
 "C-H"  backward-delete-char
 "C-I"  complete
@@ -1482,7 +1498,7 @@ VI Insert Mode functions
 "C-?"  backward-delete-char
 .PP
 VI Command Mode functions
-.sp
+.PP
 "C-D"  vi-eof-maybe
 "C-E"  emacs-editing-mode
 "C-G"  abort
index 3793d81332aa8d966d68f9f444f5716fbff20938..aa64852e993f9bb202058f5f78086784dd3442fc 100644 (file)
@@ -323,13 +323,14 @@ the line, thereby executing the command from the history list.
 A movement command will terminate the search, make the last line found
 the current line, and begin editing.
 
-Readline remembers the last incremental search string.  If two
-@kbd{C-r}s are typed without any intervening characters defining a new
-search string, any remembered search string is used.
+Readline remembers the last incremental search string.
+If two @kbd{C-r}s are typed without any intervening characters defining
+a new search string, Readline uses any remembered search string.
 
 Non-incremental searches read the entire search string before starting
-to search for matching history lines.  The search string may be
-typed by the user or be part of the contents of the current line.
+to search for matching history lines.
+The search string may be typed by the user or be part of the contents of
+the current line.
 
 @node Readline Init File
 @section Readline Init File
@@ -2502,9 +2503,11 @@ complete -o filenames -o nospace -o bashdefault -F _comp_cd cd
 @noindent
 Since we'd like Bash and Readline to take care of some
 of the other details for us, we use several other options to tell Bash
-and Readline what to do.  The @option{-o filenames} option tells Readline
+and Readline what to do.
+The @option{-o filenames} option tells Readline
 that the possible completions should be treated as filenames, and quoted
-appropriately.  That option will also cause Readline to append a slash to
+appropriately.
+That option will also cause Readline to append a slash to
 filenames it can determine are directories (which is why we might want to
 extend @code{_comp_cd} to append a slash if we're using directories found
 via @var{CDPATH}: Readline can't tell those completions are directories).
@@ -2512,9 +2515,10 @@ The @option{-o nospace} option tells Readline to not append a space
 character to the directory name, in case we want to append to it.
 The @option{-o bashdefault} option brings in the rest of the "Bash default"
 completions -- possible completions that Bash adds to the default Readline
-set.  These include things like command name completion, variable completion
-for words beginning with @samp{$} or @samp{$@{}, completions containing pathname
-expansion patterns (@pxref{Filename Expansion}), and so on.
+set.
+These include things like command name completion, variable completion
+for words beginning with @samp{$} or @samp{$@{}, completions containing
+pathname expansion patterns (@pxref{Filename Expansion}), and so on.
 
 Once installed using @code{complete}, @code{_comp_cd} will be called every
 time we attempt word completion for a @code{cd} command.
@@ -2523,8 +2527,8 @@ Many more examples -- an extensive collection of completions for most of
 the common GNU, Unix, and Linux commands -- are available as part of the
 bash_completion project.  This is installed by default on many GNU/Linux
 distributions.  Originally written by Ian Macdonald, the project now lives
-at @url{https://github.com/scop/bash-completion/}.  There are ports for
-other systems such as Solaris and Mac OS X.
+at @url{https://github.com/scop/bash-completion/}.
+There are ports for other systems such as Solaris and Mac OS X.
 
 An older version of the bash_completion package is distributed with bash
 in the @file{examples/complete} subdirectory.
index 2eed8b11ded2e410a204c389fca3a850ff37a63f..9c820a91c2510ac4f28060bdb8fa090af0384155 100644 (file)
@@ -5,7 +5,7 @@ Copyright (C) 1988-2024 Free Software Foundation, Inc.
 @set EDITION 8.3
 @set VERSION 8.3
 
-@set UPDATED 5 January 2024
+@set UPDATED 19 January 2024
 @set UPDATED-MONTH January 2024
 
-@set LASTCHANGE Fri Jan  5 11:01:44 EST 2024
+@set LASTCHANGE Fri Jan 19 11:01:44 EST 2024
index f8c356e50e191b2c5ce7d4ac763e16ba64f473b7..3224706f72bf7a626f789e03096f07ee1b315fe2 100644 (file)
@@ -914,37 +914,40 @@ extern int rl_persistent_signal_handlers;
 #define MULT_MATCH      2
 
 /* Possible state values for rl_readline_state */
-#define RL_STATE_NONE          0x000000                /* no state; before first call */
-
-#define RL_STATE_INITIALIZING  0x0000001       /* initializing */
-#define RL_STATE_INITIALIZED   0x0000002       /* initialization done */
-#define RL_STATE_TERMPREPPED   0x0000004       /* terminal is prepped */
-#define RL_STATE_READCMD       0x0000008       /* reading a command key */
-#define RL_STATE_METANEXT      0x0000010       /* reading input after ESC */
-#define RL_STATE_DISPATCHING   0x0000020       /* dispatching to a command */
-#define RL_STATE_MOREINPUT     0x0000040       /* reading more input in a command function */
-#define RL_STATE_ISEARCH       0x0000080       /* doing incremental search */
-#define RL_STATE_NSEARCH       0x0000100       /* doing non-inc search */
-#define RL_STATE_SEARCH                0x0000200       /* doing a history search */
-#define RL_STATE_NUMERICARG    0x0000400       /* reading numeric argument */
-#define RL_STATE_MACROINPUT    0x0000800       /* getting input from a macro */
-#define RL_STATE_MACRODEF      0x0001000       /* defining keyboard macro */
-#define RL_STATE_OVERWRITE     0x0002000       /* overwrite mode */
-#define RL_STATE_COMPLETING    0x0004000       /* doing completion */
-#define RL_STATE_SIGHANDLER    0x0008000       /* in readline sighandler */
-#define RL_STATE_UNDOING       0x0010000       /* doing an undo */
-#define RL_STATE_INPUTPENDING  0x0020000       /* rl_execute_next called */
-#define RL_STATE_TTYCSAVED     0x0040000       /* tty special chars saved */
-#define RL_STATE_CALLBACK      0x0080000       /* using the callback interface */
-#define RL_STATE_VIMOTION      0x0100000       /* reading vi motion arg */
-#define RL_STATE_MULTIKEY      0x0200000       /* reading multiple-key command */
-#define RL_STATE_VICMDONCE     0x0400000       /* entered vi command mode at least once */
-#define RL_STATE_CHARSEARCH    0x0800000       /* vi mode char search */
-#define RL_STATE_REDISPLAYING  0x1000000       /* updating terminal display */
-
-#define RL_STATE_DONE          0x2000000       /* done; accepted line */
-#define RL_STATE_TIMEOUT       0x4000000       /* done; timed out */
-#define RL_STATE_EOF           0x8000000       /* done; got eof on read */
+#define RL_STATE_NONE          0x0000000       /* no state; before first call */
+
+#define RL_STATE_INITIALIZING  0x00000001      /* initializing */
+#define RL_STATE_INITIALIZED   0x00000002      /* initialization done */
+#define RL_STATE_TERMPREPPED   0x00000004      /* terminal is prepped */
+#define RL_STATE_READCMD       0x00000008      /* reading a command key */
+#define RL_STATE_METANEXT      0x00000010      /* reading input after ESC */
+#define RL_STATE_DISPATCHING   0x00000020      /* dispatching to a command */
+#define RL_STATE_MOREINPUT     0x00000040      /* reading more input in a command function */
+#define RL_STATE_ISEARCH       0x00000080      /* doing incremental search */
+#define RL_STATE_NSEARCH       0x00000100      /* doing non-inc search */
+#define RL_STATE_SEARCH                0x00000200      /* doing a history search */
+#define RL_STATE_NUMERICARG    0x00000400      /* reading numeric argument */
+#define RL_STATE_MACROINPUT    0x00000800      /* getting input from a macro */
+#define RL_STATE_MACRODEF      0x00001000      /* defining keyboard macro */
+#define RL_STATE_OVERWRITE     0x00002000      /* overwrite mode */
+#define RL_STATE_COMPLETING    0x00004000      /* doing completion */
+#define RL_STATE_SIGHANDLER    0x00008000      /* in readline sighandler */
+#define RL_STATE_UNDOING       0x00010000      /* doing an undo */
+#define RL_STATE_INPUTPENDING  0x00020000      /* rl_execute_next called */
+#define RL_STATE_TTYCSAVED     0x00040000      /* tty special chars saved */
+#define RL_STATE_CALLBACK      0x00080000      /* using the callback interface */
+#define RL_STATE_VIMOTION      0x00100000      /* reading vi motion arg */
+#define RL_STATE_MULTIKEY      0x00200000      /* reading multiple-key command */
+#define RL_STATE_VICMDONCE     0x00400000      /* entered vi command mode at least once */
+#define RL_STATE_CHARSEARCH    0x00800000      /* vi mode char search */
+#define RL_STATE_REDISPLAYING  0x01000000      /* updating terminal display */
+
+#define RL_STATE_DONE          0x02000000      /* done; accepted line */
+#define RL_STATE_TIMEOUT       0x04000000      /* done; timed out */
+#define RL_STATE_EOF           0x08000000      /* done; got eof on read */
+
+/* Rearrange these for next major version */
+#define RL_STATE_READSTR       0x10000000      /* reading a string for M-x */
 
 #define RL_SETSTATE(x)         (rl_readline_state |= (x))
 #define RL_UNSETSTATE(x)       (rl_readline_state &= ~(x))
index 461617c4b691362776db8d6e25bb7fd2d476c0e2..a2ab98bc1487c77777f7ee75f73c79fc2bc281db 100644 (file)
@@ -67,6 +67,7 @@
 #define SF_CHGKMAP             0x08
 #define SF_PATTERN             0x10
 #define SF_NOCASE              0x20            /* unused so far */
+#define SF_FREEPMT             0x40            /* saved prompt separately, need to free it */
 
 typedef struct  __rl_search_context
 {
@@ -111,7 +112,8 @@ typedef struct  __rl_search_context
 } _rl_search_cxt;
 
 /* readstr flags */
-#define RL_READSTR_NOSPACE     0x01    /* don't insert space, use for completion */
+#define READSTR_NOSPACE        0x01    /* don't insert space, use for completion */
+#define READSTR_FREEPMT        0x02    /* called rl_save_prompt, need to free it ourselves */
 
 typedef struct  __rl_readstr_context
 {
@@ -432,6 +434,7 @@ extern int _rl_restore_tty_signals (void);
 /* search.c */
 extern int _rl_nsearch_callback (_rl_search_cxt *);
 extern int _rl_nsearch_cleanup (_rl_search_cxt *, int);
+extern int _rl_nsearch_sigcleanup (_rl_search_cxt *, int);
 
 extern void _rl_free_saved_search_line (void);
 
@@ -443,6 +446,8 @@ extern void _rl_release_sigint (void);
 extern void _rl_block_sigwinch (void);
 extern void _rl_release_sigwinch (void);
 
+extern void _rl_state_sigcleanup (void);
+
 /* terminal.c */
 extern void _rl_get_screen_size (int, int);
 extern void _rl_sigwinch_resize_terminal (void);
@@ -488,6 +493,7 @@ extern void _rl_free_saved_readstr_line (void);
 extern void _rl_unsave_saved_readstr_line (void);
 extern _rl_readstr_cxt *_rl_readstr_init (int, int);
 extern int _rl_readstr_cleanup (_rl_readstr_cxt *, int);
+extern int _rl_readstr_sigcleanup (_rl_readstr_cxt *, int);
 extern void _rl_readstr_restore (_rl_readstr_cxt *);
 extern int _rl_readstr_getchar (_rl_readstr_cxt *);
 extern int _rl_readstr_dispatch (_rl_readstr_cxt *, int);
index 37db052ecc54b47daab724328e99402c8dca2d99..6b078d7c243a2601e10f9ed61fb6631add6ceaff 100644 (file)
--- a/search.c
+++ b/search.c
@@ -286,6 +286,7 @@ _rl_nsearch_init (int dir, int pchar)
   rl_end = rl_point = 0;
 
   p = _rl_make_prompt_for_search (pchar ? pchar : ':');
+  cxt->sflags |= SF_FREEPMT;
   rl_message ("%s", p);
   xfree (p);
 
@@ -313,13 +314,24 @@ _rl_nsearch_abort (_rl_search_cxt *cxt)
   _rl_unsave_saved_search_line ();
   rl_point = cxt->save_point;
   rl_mark = cxt->save_mark;
-  rl_restore_prompt ();
+  if (cxt->sflags & SF_FREEPMT)
+    rl_restore_prompt ();              /* _rl_make_prompt_for_search saved it */
+  cxt->sflags &= ~SF_FREEPMT;
   rl_clear_message ();
   _rl_fix_point (1);
 
   RL_UNSETSTATE (RL_STATE_NSEARCH);
 }
 
+int
+_rl_nsearch_sigcleanup (_rl_search_cxt *cxt, int r)
+{
+  if (cxt->sflags & SF_FREEPMT)
+    rl_restore_prompt ();              /* _rl_make_prompt_for_search saved it */
+  cxt->sflags &= ~SF_FREEPMT;
+  return (_rl_nsearch_cleanup (cxt, r));
+}
+
 /* Process just-read character C according to search context CXT.  Return -1
    if the caller should abort the search, 0 if we should break out of the
    loop, and 1 if we should continue to read characters. */
@@ -427,7 +439,9 @@ _rl_nsearch_dosearch (_rl_search_cxt *cxt)
        {
          _rl_free_saved_search_line ();
          rl_ding ();
-         rl_restore_prompt ();
+         if (cxt->sflags & SF_FREEPMT)
+           rl_restore_prompt ();
+         cxt->sflags &= ~SF_FREEPMT;
          RL_UNSETSTATE (RL_STATE_NSEARCH);
          return -1;
        }
@@ -452,7 +466,9 @@ _rl_nsearch_dosearch (_rl_search_cxt *cxt)
 #endif
     }
 
-  rl_restore_prompt ();
+  if (cxt->sflags & SF_FREEPMT)
+    rl_restore_prompt ();
+  cxt->sflags &= ~SF_FREEPMT;
   return (noninc_dosearch (noninc_search_string, cxt->direction, cxt->sflags&SF_PATTERN));
 }
 
index 51d746809f3b5e7940dc3f89322663e71ba55af4..92dd2ffc94a4904dbc559d83e36dee1f1df9f07d 100644 (file)
--- a/signals.c
+++ b/signals.c
@@ -585,6 +585,19 @@ rl_reset_after_signal (void)
   rl_set_signals ();
 }
 
+/* Similar to rl_callback_sigcleanup, but cleans up operations that allocate
+   state even when not in callback mode. */
+void
+_rl_state_sigcleanup (void)
+{
+  if (RL_ISSTATE (RL_STATE_ISEARCH))           /* incremental search */
+    _rl_isearch_cleanup (_rl_iscxt, 0);
+  else if (RL_ISSTATE (RL_STATE_NSEARCH))      /* non-incremental search */
+    _rl_nsearch_sigcleanup (_rl_nscxt, 0);
+  else if (RL_ISSTATE (RL_STATE_READSTR))      /* reading a string */
+    _rl_readstr_sigcleanup (_rl_rscxt, 0);
+}
+
 /* Free up the readline variable line state for the current line (undo list,
    any partial history entry, any keyboard macros in progress, and any
    numeric arguments in process) after catching a signal, before calling
@@ -594,6 +607,9 @@ rl_free_line_state (void)
 {
   register HIST_ENTRY *entry;
 
+  if (RL_ISSTATE (RL_STATE_CALLBACK) == 0)
+    _rl_state_sigcleanup ();
+
   rl_free_undo_list ();
 
   entry = current_history ();
diff --git a/text.c b/text.c
index 25e848492cd3c1b81a4703cdd63a5de273d10d1f..e8bf4506a21494e78ae1d390ae8f903f926f14f8 100644 (file)
--- a/text.c
+++ b/text.c
@@ -1971,10 +1971,13 @@ _rl_rscxt_dispose (_rl_readstr_cxt *cxt, int flags)
   xfree (cxt);
 }
 
+/* This isn't used yet */
 void
 _rl_free_saved_readstr_line ()
 {
   if (_rl_saved_line_for_readstr)
+    /* This doesn't free any saved undo list, if it needs to,
+       rl_clear_history shows how to do it. */
     _rl_free_saved_line (_rl_saved_line_for_readstr);
   _rl_saved_line_for_readstr = (HIST_ENTRY *)NULL;
 }
@@ -1983,7 +1986,10 @@ void
 _rl_unsave_saved_readstr_line ()
 {
   if (_rl_saved_line_for_readstr)
-    _rl_unsave_line (_rl_saved_line_for_readstr);
+    {
+      _rl_free_undo_list (rl_undo_list);
+      _rl_unsave_line (_rl_saved_line_for_readstr);    /* restores rl_undo_list */
+    }
   _rl_saved_line_for_readstr = (HIST_ENTRY *)NULL;
 }
 
@@ -2004,9 +2010,12 @@ _rl_readstr_init (int pchar, int flags)
   rl_end = rl_point = 0;
 
   p = _rl_make_prompt_for_search (pchar ? pchar : '@');
+  cxt->flags |= READSTR_FREEPMT;
   rl_message ("%s", p);
   xfree (p);
 
+  RL_SETSTATE (RL_STATE_READSTR);
+
   _rl_rscxt = cxt;  
 
   return cxt;
@@ -2018,6 +2027,8 @@ _rl_readstr_cleanup (_rl_readstr_cxt *cxt, int r)
   _rl_rscxt_dispose (cxt, 0);
   _rl_rscxt = 0;
 
+  RL_UNSETSTATE (RL_STATE_READSTR);
+
   return (r != 1);
 }
 
@@ -2027,11 +2038,22 @@ _rl_readstr_restore (_rl_readstr_cxt *cxt)
   _rl_unsave_saved_readstr_line ();    /* restores rl_undo_list */
   rl_point = cxt->save_point;
   rl_mark = cxt->save_mark;
-  rl_restore_prompt ();                /* _rl_make_prompt_for_search saved it */
+  if (cxt->flags & READSTR_FREEPMT)
+    rl_restore_prompt ();              /* _rl_make_prompt_for_search saved it */
+  cxt->flags &= ~READSTR_FREEPMT;
   rl_clear_message ();
   _rl_fix_point (1);
 }
 
+int
+_rl_readstr_sigcleanup (_rl_readstr_cxt *cxt, int r)
+{
+  if (cxt->flags & READSTR_FREEPMT)
+    rl_restore_prompt ();              /* _rl_make_prompt_for_search saved it */
+  cxt->flags &= ~READSTR_FREEPMT;
+  return (_rl_readstr_cleanup (cxt, r));
+}
+  
 int   
 _rl_readstr_getchar (_rl_readstr_cxt *cxt)
 {
@@ -2130,7 +2152,7 @@ _rl_readstr_dispatch (_rl_readstr_cxt *cxt, int c)
       break;
 
     case ' ':
-      if ((cxt->flags & RL_READSTR_NOSPACE) == 0)
+      if ((cxt->flags & READSTR_NOSPACE) == 0)
        {
          _rl_insert_char (1, c);
          break;
@@ -2273,7 +2295,7 @@ _rl_read_command_name ()
   char *ret;
   int c, r;
 
-  cxt = _rl_readstr_init ('!', RL_READSTR_NOSPACE);
+  cxt = _rl_readstr_init ('!', READSTR_NOSPACE);
   cxt->compfunc = _rl_readcmd_complete;
 
   /* skip callback stuff for now */
@@ -2344,5 +2366,6 @@ rl_execute_named_command (int count, int key)
       r = 1;
     }
 
+  free (command);
   return r;
 }