I know about the bash history navigation with the Up and Down arrows.
I would like a lazy way to select a previous command that matches some regex (that is shorter than the whole command, so it takes less time to be typed).
Is it possible with bash?
If not, do other shells have such a feature?
You can always use
CTRL-Rto search your history backward, and type some part of the previous command. HittingCTRL-Ragain (after the first hit) repeats your query (jumps to the next match if any).Personally I use this for regex search (as regex searching is not possible yet (AFAIK)):
Edit: For searching most recent history items via that function, see this (on setting $PROMPT_COMMAND ).