Created
May 20, 2015 09:15
-
-
Save freak4pc/75aa1129ee45572d97d6 to your computer and use it in GitHub Desktop.
History that accepts a grep filter inline as an argument
This file contains hidden or 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
function __history { | |
[ -n "$1" ] && history 1 | grep -i $1 || history 1 | |
} | |
alias history='__history' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment