Fixed a bug in *omz_history* where it would automatically create a file when run with the -p flag

This commit is contained in:
MoAlkhateeb 2024-04-09 00:57:52 +03:00
commit 81576bbb6d

View file

@ -12,8 +12,8 @@ function omz_history {
# if -l provided, run as if calling `fc' directly # if -l provided, run as if calling `fc' directly
builtin fc "$@" builtin fc "$@"
else else
# unless a number is provided, show all history events (starting from 1) # otherwise, run `fc -l` with a custom format
[[ ${@[-1]-} = *[0-9]* ]] && builtin fc -l "$@" || builtin fc -l "$@" 1 builtin fc -l "$@"
fi fi
} }