Created
February 29, 2012 05:03
-
-
Save hernamesbarbara/1937992 to your computer and use it in GitHub Desktop.
search bash history quickly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set completion-ignore-case on | |
#use up arrow to search history backwards | |
"\e[A": history-search-backward | |
"\e[B": history-search-forward | |
$if Bash | |
Space: magic-space | |
$endif | |
"\M-o": "\C-p\C-a\M-f " | |
set completion-ignore-case on | |
set visible-stats on | |
set show-all-if-ambiguous on | |
"\M-s": menu-complete | |
#This will let you to begin a command and hit the up-arrow | |
#to search backwards through your history for commands starting | |
#with whatever you've typed so far | |
"\eOA": history-search-backward | |
"\e[A": history-search-backward | |
"\eOB": history-search-forward | |
"\e[B": history-search-forward | |
"\eOC": forward-char | |
"\e[C": forward-char | |
"\eOD": backward-char | |
"\e[D": backward-char |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment