Skip to content

Instantly share code, notes, and snippets.

@hernamesbarbara
Created February 29, 2012 05:03
Show Gist options
  • Save hernamesbarbara/1937992 to your computer and use it in GitHub Desktop.
Save hernamesbarbara/1937992 to your computer and use it in GitHub Desktop.
search bash history quickly
#!/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