More often than not, you already typed yesterday the commands you’re about to use today. Wouldn’t it be handy to be able to retrieve the long command instead of typing them yet another time?
Hit Ctrl+R
, you’ll see:
(reverse-i-search)`':
This is bash
(zsh
prompt will be similar) opening the search interface for you.
Type some letters, it will find the most recent command with these letters.
Keep pressing Ctrl+R
to continue the search backward, and Ctrl+Backspace
to search forward.