aboutsummaryrefslogtreecommitdiffstats
path: root/zuwu.zsh
diff options
context:
space:
mode:
authorLibravatarLarge Libravatar memdmp <memdmpestrogenzone>2025-03-01 02:26:00 +0100
committerLibravatarLarge Libravatar memdmp <memdmpestrogenzone>2025-03-01 02:26:00 +0100
commit69ff5cc5b609666ed34113dd7fea0325013f207a (patch)
tree7f838b77cf9370b0ab9ceb1a3ab68168aac0ad5f /zuwu.zsh
parent92ab996f0f023018dbb043ac64f39ad79e9f3b9d (diff)
downloadzuwu-69ff5cc5b609666ed34113dd7fea0325013f207a.tar.gz
zuwu-69ff5cc5b609666ed34113dd7fea0325013f207a.tar.bz2
zuwu-69ff5cc5b609666ed34113dd7fea0325013f207a.tar.lz
zuwu-69ff5cc5b609666ed34113dd7fea0325013f207a.zip

feat: force save by default

Diffstat (limited to 'zuwu.zsh')
-rwxr-xr-xzuwu.zsh6
1 files changed, 4 insertions, 2 deletions
diff --git a/zuwu.zsh b/zuwu.zsh
index fa500f9..938979a 100755
--- a/zuwu.zsh
+++ b/zuwu.zsh
@@ -294,8 +294,9 @@ __sethist
# History Size Determination
if [[ "$AVOID_SETTING_HIST_INFO" == "" ]]; then
- if ! [ -n "${HISTSIZE+1}" ] || ! [ -n "${SAVEHIST+1}" ]; then
- eval_append ~/.zshrc "$(<<EOF
+ if ! [ -n "${HISTSIZE+1}" ] || ! [ -n "${SAVEHIST+1}" ] || [[ "$SAVEHIST" == "0" ]] || [[ "$HISTSIZE" == "0" ]]; then
+ if ! grep "Lines configured by zsh-newuser-install" ~/.zshrc >/dev/null 2>/dev/null; then
+ eval_append ~/.zshrc "$(<<EOF
# Lines configured by zsh-newuser-install
HISTFILE="~/.histfile"
HISTSIZE="10000"
@@ -306,6 +307,7 @@ SAVEHIST="10000"
typeset -f __sethist >/dev/null 2>/dev/null && __sethist || true
EOF
)"
+ fi
fi
fi