diff --git a/lib/history.zsh b/lib/history.zsh index 2d3f28a3e..7123c1c93 100644 --- a/lib/history.zsh +++ b/lib/history.zsh @@ -1,5 +1,6 @@ ## History wrapper function omz_history { + # parse arguments and remove from $@ local clear list stamp zparseopts -E -D c=clear l=list f=stamp E=stamp i=stamp @@ -9,14 +10,14 @@ function omz_history { elif [[ -n "$clear" ]]; then # if -c provided, clobber the history file echo -n >| "$HISTFILE" - fc $stamp -p "$HISTFILE" + fc -p "$HISTFILE" echo >&2 History file deleted. elif [[ -n "$list" ]]; then # if -l provided, run as if calling `fc' directly - builtin fc $stamp "$@" + builtin fc $stamp -l "$@" else # otherwise, run `fc -l` with a custom format - builtin fc -l "$@" + builtin fc $stamp -l "$@" fi }