Created
April 9, 2015 18:09
-
-
Save cjus/ed75b19cef21fe1fcb23 to your computer and use it in GitHub Desktop.
Search in recent shell history
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
hfind() { | |
history | grep $1 | grep -v history | grep -v hfind | sed -E 's/^.{7}//' | sort | uniq | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Added to my .bash_profile and used in the shell as:
$ hfind git
$ hfind vagrant