summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMoAlkhateeb <110918029+MoAlkhateeb@users.noreply.github.com>2024-04-09 09:07:57 +0300
committerGitHub <noreply@github.com>2024-04-09 08:07:57 +0200
commita8f7f9f707ca5fb9ac7bedb088748b09db2fd3bd (patch)
tree38f5ab6a18b59997b1bf0a4db40de7bc95dc5249 /lib
parent3e2a5742cdb4deae4d7f10351d59c7f2933e3555 (diff)
downloadzsh-a8f7f9f707ca5fb9ac7bedb088748b09db2fd3bd.tar.gz
zsh-a8f7f9f707ca5fb9ac7bedb088748b09db2fd3bd.tar.bz2
zsh-a8f7f9f707ca5fb9ac7bedb088748b09db2fd3bd.zip
fix(history)!: fix arg passing to `fc` for `history` command (#12338)
BREAKING CHANGE: we have fixed a bug in the `history` wrapper for OMZ which means that running just history will now not show all the history since the 1st command, but only recent ones. To get the previous behavior, you can run `history 1` to get all the command history, or other commands such as `history -30` to get the last 30 commands.
Diffstat (limited to 'lib')
-rw-r--r--lib/history.zsh4
1 files 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
}