mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-13 03:01:32 +01:00
Fixed a bug in *omz_history* where it would automatically create a file when run with the -p flag
This commit is contained in:
parent
3e2a5742cd
commit
81576bbb6d
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue