Skip to content

Instantly share code, notes, and snippets.

@freak4pc
Created May 20, 2015 09:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save freak4pc/75aa1129ee45572d97d6 to your computer and use it in GitHub Desktop.
Save freak4pc/75aa1129ee45572d97d6 to your computer and use it in GitHub Desktop.
History that accepts a grep filter inline as an argument
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