Add history shortcut to zshrc
This commit is contained in:
parent
1eeff97bfc
commit
58d70b9778
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…
Reference in New Issue
Block a user