Next: Shell History Copying Up: Shell History
Shell History Ring
Fetch the next earlier old shell command.
Fetch the next later old shell command.
`M-r REGEXP RET'
`M-s REGEXP RET'
Search backwards or forwards for old shell commands that match
Shell buffers provide a history of previously entered shell
commands. To reuse shell commands from the history, use the editing
commands `M-p', `M-n', `M-r' and `M-s'. These work just like the
minibuffer history commands except that they operate on the text at the
end of the shell buffer, where you would normally insert text to send
to the shell.
`M-p' fetches an earlier shell command to the end of the shell
buffer. Successive use of `M-p' fetches successively earlier shell
commands, each replacing any text that was already present as potential
shell input. `M-n' does likewise except that it finds successively
more recent shell commands from the buffer.
The history search commands `M-r' and `M-s' read a regular
expression and search through the history for a matching command. Aside
from the choice of which command to fetch, they work just like `M-p'
and `M-r'. If you enter an empty regexp, these commands reuse the same
regexp used last time.
When you find the previous input you want, you can resubmit it by
typing RET, or you can edit it first and then resubmit it if you wish.
These commands get the text of previous shell commands from a special
history list, not from the shell buffer itself. Thus, editing the shell
buffer, or even killing large parts of it, does not affect the history
that these commands access.
automatically generated by info2www