diff options
Diffstat (limited to '.config')
-rw-r--r-- | .config/zsh/history.zsh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/.config/zsh/history.zsh b/.config/zsh/history.zsh index eb04ef9..edfc9e1 100644 --- a/.config/zsh/history.zsh +++ b/.config/zsh/history.zsh @@ -10,4 +10,10 @@ setopt hist_ignore_all_dups # deduplicate entire history file setopt hist_verify # confirm before executing setopt share_history # import all of history in new sessions -alias h='fc -l 0 | grep' # search all of history +# search all of history, or display just the last 16 like the builtin `history` +# yes we should probably just use fzf which we have installed just for this +function h () { + [ $# -eq 0 ] &&\ + fc -l ||\ + fc -l 0 | grep "$*" +} |