mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-19 20:29:45 +01:00
lib: don't override bigger HISTSIZE and SAVEHIST values (#8993)
oh-my-zsh Changes the HISTSIZE and SAVEHIST values to fixed sizes, however if a bigger value is set in ~/.zshrc, it will override it, potentially causing the user history to be deleted. So, only set these values if no other is set and if it is lower than the default ones.
This commit is contained in:
parent
82f02e80a6
commit
ed4e317bbb
1 changed files with 2 additions and 2 deletions
|
@ -27,8 +27,8 @@ esac
|
||||||
|
|
||||||
## History file configuration
|
## History file configuration
|
||||||
[ -z "$HISTFILE" ] && HISTFILE="$HOME/.zsh_history"
|
[ -z "$HISTFILE" ] && HISTFILE="$HOME/.zsh_history"
|
||||||
HISTSIZE=50000
|
[ "$HISTSIZE" -lt 50000 ] && HISTSIZE=50000
|
||||||
SAVEHIST=10000
|
[ "$SAVEHIST" -lt 10000 ] && SAVEHIST=10000
|
||||||
|
|
||||||
## History command configuration
|
## History command configuration
|
||||||
setopt extended_history # record timestamp of command in HISTFILE
|
setopt extended_history # record timestamp of command in HISTFILE
|
||||||
|
|
Loading…
Reference in a new issue