This PR adds support for different history search mode.
The default mode is left unchanged where using up/down keys will search the State's history via prefixed strings.
We add a new mode where searching will match on the index of the pattern rather than prefix.
This is a clean-room implementation of the Fish shell's history search feature, where you can type in any part of any command from history and then press chosen keys, such as the UP and DOWN arrows, to cycle through matches.
This PR adds support for different history search mode.
The default mode is left unchanged where using up/down keys will search the State's history via prefixed strings. We add a new mode where searching will match on the index of the pattern rather than prefix.
This is inspired by the oh-my-zsh zsh-history-substring-search plugin.