3 <title>Debugging with GDB
</title>
4 <meta http-equiv=
"Content-Type" content=
"text/html">
5 <meta name=
"description" content=
"Debugging with GDB">
6 <meta name=
"generator" content=
"makeinfo 4.3">
7 <link href=
"http://www.gnu.org/software/texinfo/" rel=
"generator-home">
12 Node:
<a name=
"Searching">Searching
</a>,
13 Previous:
<a rel=
"previous" accesskey=
"p" href=
"Readline-Arguments.html#Readline%20Arguments">Readline Arguments
</a>,
14 Up:
<a rel=
"up" accesskey=
"u" href=
"Readline-Interaction.html#Readline%20Interaction">Readline Interaction
</a>
18 <h4 class=
"subsection">Searching for Commands in the History
</h4>
20 <p>Readline provides commands for searching through the command history
21 for lines containing a specified string.
22 There are two search modes:
<dfn>incremental
</dfn> and
<dfn>non-incremental
</dfn>.
24 <p>Incremental searches begin before the user has finished typing the
26 As each character of the search string is typed, Readline displays
27 the next entry from the history matching the string typed so far.
28 An incremental search requires only as many characters as needed to
29 find the desired history entry.
30 To search backward in the history for a particular string, type
31 <kbd>C-r
</kbd>. Typing
<kbd>C-s
</kbd> searches forward through the history.
32 The characters present in the value of the
<code>isearch-terminators
</code> variable
33 are used to terminate an incremental search.
34 If that variable has not been assigned a value, the
<ESC
> and
35 <kbd>C-J
</kbd> characters will terminate an incremental search.
36 <kbd>C-g
</kbd> will abort an incremental search and restore the original line.
37 When the search is terminated, the history entry containing the
38 search string becomes the current line.
40 <p>To find other matching entries in the history list, type
<kbd>C-r
</kbd> or
41 <kbd>C-s
</kbd> as appropriate.
42 This will search backward or forward in the history for the next
43 entry matching the search string typed so far.
44 Any other key sequence bound to a Readline command will terminate
45 the search and execute that command.
46 For instance, a
<RET
> will terminate the search and accept
47 the line, thereby executing the command from the history list.
48 A movement command will terminate the search, make the last line found
49 the current line, and begin editing.
51 <p>Non-incremental searches read the entire search string before starting
52 to search for matching history lines. The search string may be
53 typed by the user or be part of the contents of the current line.