My terminal supports history search through C-r (backward) and C-s (forward), this is very convenient. It would be nice to have this in Down as well.
I assume this is familiar to people, but for the record, the behavior is as follows:
if I type C-r or C-s, the terminal enters "search mode" (forward or backward), where it expects a string fragment; it replaces the current line with (reverse-i-search)`': (if using C-r)
at this point I can type a search string (backspace also works), which is displayed in the `' part of the line prefix; for example if I enter les, the line prefix becomes (reverse-i-search)`les':
the terminal searches for the last occurrence of the search fragment in my history, and shows it after the :; right now on my machine this shows (reverse-i-search)`les': less /home/gasche/.opam/5.2.0/lib/ocaml/caml/unixsupport.h
if I type C-r again, it jumps to the previous occurrence in history; C-s jumps to the next occurrence
I know of two ways to exit this search mode:
if I type Enter, the current history entry becomes the current terminal prompt input and gets executed
if I type left or right, the history entry becomes the current terminal prompt input, without being executed (so I can edit it before executing it)
My terminal supports history search through C-r (backward) and C-s (forward), this is very convenient. It would be nice to have this in Down as well.
I assume this is familiar to people, but for the record, the behavior is as follows:
(reverse-i-search)`':
(if using C-r)`'
part of the line prefix; for example if I enterles
, the line prefix becomes(reverse-i-search)`les':
:
; right now on my machine this shows(reverse-i-search)`les': less /home/gasche/.opam/5.2.0/lib/ocaml/caml/unixsupport.h