I have a Mac laptop for work, and while on the terminal (on iterm2), I can start typing a command (e.g. ssh) then press "up" key to browse through my recent commands that begin with whatever I started typing (e.g ssh .......).
On Ubuntu terminal, I can see a similar feature with the keyboard shortcut "CTRL + R". However, it's not quite the same. Is there a way to mimic the Mac feature?
Thank you!
Edit with examples for clarity:
Here's an example of what I mean on the Mac. Let's say in the past 100 commands run in my Mac terminal, I had 2 commands that were:
ssh 1.2.3.4
ssh 127.0.0.1
Then when I type "ssh" and hit "up" key, it would autofill to ssh 127.0.0.1
, and if I hit "up" key again, it would fill to ssh 1.2.3.4
.
However, on Ubuntu terminal, if let's say my 3 most recent commands were
ssh 1.2.3.4
open .
echo "help me"
Then by typing "ssh" and hitting "up" key, it would simply take me to echo "help me"
. And hitting "up" key again would take me to open .
To me it makes more intuitive sense to have this pattern instead of having to use the CTRL+R
route.
fzf
looks pretty cool thank you for the suggestion – Barry Nov 05 '20 at 10:38