From 81576bbb6d691d979d3b1b25670f008ff8f4ee3b Mon Sep 17 00:00:00 2001 From: MoAlkhateeb Date: Tue, 9 Apr 2024 00:57:52 +0300 Subject: [PATCH] Fixed a bug in *omz_history* where it would automatically create a file when run with the -p flag --- lib/history.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/history.zsh b/lib/history.zsh index 794076904..c39c8c866 100644 --- a/lib/history.zsh +++ b/lib/history.zsh @@ -12,8 +12,8 @@ function omz_history { # if -l provided, run as if calling `fc' directly builtin fc "$@" else - # unless a number is provided, show all history events (starting from 1) - [[ ${@[-1]-} = *[0-9]* ]] && builtin fc -l "$@" || builtin fc -l "$@" 1 + # otherwise, run `fc -l` with a custom format + builtin fc -l "$@" fi }