-1
means we haven't started looking at history, n >= 0
means we're
currently at history command n
Predicate to check if either we're searching for a term or if we're in history-browsing mode and some predicate is true.
Predicate to check if either we're searching for a term or if we're in history-browsing mode and some predicate is true.
Very often we want to capture keystrokes in search-mode more aggressively than in history-mode, e.g. search-mode drops you out more aggressively than history-mode does, and its up/down keys cycle through history more aggressively on every keystroke while history-mode only cycles when you reach the top/bottom line of the multi-line input.
The term we're searching for, if any.
The term we're searching for, if any.
- None
means we're not searching for anything, e.g. we're just
browsing history
- Some(term)
where term
is not empty is what it normally looks
like when we're searching for something
- Some(term)
where term
is empty only really happens when you
start searching and delete things, or if you Ctrl-R
on an empty
prompt
Kicks the HistoryFilter from passive-mode into search-history mode
Provides history navigation up and down, saving the current line.