Skip to content

Instantly share code, notes, and snippets.

@wigsy
Created June 26, 2013 17:08
Show Gist options
  • Save wigsy/5869295 to your computer and use it in GitHub Desktop.
Save wigsy/5869295 to your computer and use it in GitHub Desktop.
ZSH alias for grep'ing the history command easily
# in your .zshrc add:
alias HG='history | grep '
# reload ZSH (using my default location as an example)
. ~/.zshrc
# Now run: ``HG something_of_interest`` and your history is grepped for said interesting something.
@cbilgili
Copy link

Thanks. I was trying like history | grep "$1". But your method is simpler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment