DEV Community

Discussion on: Better bash history search with McFly

Collapse
 
n8kowald profile image
Nathan

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"
cows[UP]

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

Collapse
 
hamatti profile image
Juha-Matti Santala

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