Showing posts with label sudo. Show all posts
Showing posts with label sudo. Show all posts

Tuesday, March 22, 2011

Bash history autocomplete galore

Add the following lines to the end of .bashrc

-----8<-----
# make bash autocomplete with up/down arrow
bind '"\e[A":history-search-backward'
bind '"\e[B":history-search-forward'

# make tab cycle through commands instead of listing
bind '"\t":menu-complete'
----->8-----

Now by pressing arrow up/down bash will autocomplete based on your command line history, while pressing TAB will cycle through commands, directories and files names.