DEV Community

Discussion on: Better bash history search with McFly

n8kowald profile image

McFly looks great.
Makes it easy to visually find the command you're after by showing a list.
Thanks for sharing!

I've been using this in my ~/.bash_profile for an easier CTRL+R experience using the up arrow.

bind '"\e[A"':history-search-backward
bind '"\e[B"':history-search-forward

It completes from your bash history using the up keyboard key.

# Using the up keyboard key you can cycle through your last used commands starting with "cows"

If you've cycled through a few commands pressing the down arrow brings the previously cycled commands back.

hamatti profile image
Juha-Matti Santala Author

That's such a smart improvement, thanks for sharing!