Browse Source

Add history shortcut to zshrc

master
Noah Petherbridge 6 years ago
parent
commit
58d70b9778
  1. 10
      home/.zshrc

10
home/.zshrc

@ -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 #
###############################################################################

Loading…
Cancel
Save