1
0

Add history shortcut to zshrc

This commit is contained in:
Noah 2016-01-19 16:14:02 -08:00
parent 1eeff97bfc
commit 58d70b9778

View File

@ -107,6 +107,16 @@ if [[ `uname` == 'Linux' ]] then
alias ls="ls --color=auto"
fi
# `h` is a shortcut for `history 1` (show all history) or `history 1 | grep`
# example: `h ls` will do `history 1 | grep ls`
h() {
if [ -z "$*" ]; then
history 1;
else
history 1 | egrep "$@";
fi
}
###############################################################################
# zsh plugins #
###############################################################################