How do I go back to the bottom of history after pressing up in Bash?
If I scroll way up or use Ctrlr search and go way up in the history, how to get back down to the clear line? I know I can clear with Ctrle, Crtlu, but that modifies them. Is there an official way beside Ctrlc to reset the shell?
Two "official" options (from 8.4 Bindable Readline Commands in the Bash manual):
abort (C-g)
Abort the current editing command and ring the terminal’s bell (subject to the setting of bell-style
).end-of-history (M->)
Move to the end of the input history, i.e., the line currently being entered.
M->
can be entered by pressing Alt>, or Esc followed by >.
Notes:
-
abort
is to be used while in the history search mode. -
end-of-history
, on the other hand, should be used after selecting a command from the history search mode (by, e.g, pressing Esc or an arrow key).