aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatarLarge Libravatar memdmp <memdmpestrogenzone>2025-01-17 19:37:15 +0100
committerLibravatarLarge Libravatar memdmp <memdmpestrogenzone>2025-01-17 19:37:15 +0100
commitf104b3c3064571df3f90351633390ff37e90b443 (patch)
tree668b2ba1e5fbea808deb8f51bad1a355e5acd5f5
parentcc3c1f5e9f132716bad18fd8f956bb4ae0517bcb (diff)
downloadzuwu-f104b3c3064571df3f90351633390ff37e90b443.tar.gz
zuwu-f104b3c3064571df3f90351633390ff37e90b443.tar.bz2
zuwu-f104b3c3064571df3f90351633390ff37e90b443.tar.lz
zuwu-f104b3c3064571df3f90351633390ff37e90b443.zip

fix: move __sethist down

-rwxr-xr-xzuwu.zsh29
1 files changed, 15 insertions, 14 deletions
diff --git a/zuwu.zsh b/zuwu.zsh
index e7267e6..00f788f 100755
--- a/zuwu.zsh
+++ b/zuwu.zsh
@@ -38,20 +38,6 @@ compinit
EOF
)"
fi
-# History Size Determination
-if ! grep 'HISTSIZE' ~/.zshrc >/dev/null 2>/dev/null; then
- eval_append ~/.zshrc "$(<<EOF
-# Lines configured by zsh-newuser-install
-HISTFILE="~/.histfile"
-HISTSIZE="10000"
-SAVEHIST="10000"
-# End of lines configured by zsh-newuser-install
-
-# Overwrite histfile with zuwu implementation, using HISTDIR and HISTID - if you don't want this implementation, comment out the next line.
-__sethist
-EOF
-)"
-fi
# ZSH Env Setup
if ! [[ -f "$HOME/.zshenv" ]]; then
@@ -288,6 +274,21 @@ __sethist() {
__sethist
+# History Size Determination
+if ! grep 'HISTSIZE' ~/.zshrc >/dev/null 2>/dev/null; then
+ eval_append ~/.zshrc "$(<<EOF
+# Lines configured by zsh-newuser-install
+HISTFILE="~/.histfile"
+HISTSIZE="10000"
+SAVEHIST="10000"
+# End of lines configured by zsh-newuser-install
+
+# Overwrite histfile with zuwu implementation, using HISTDIR and HISTID - if you don't want this implementation, comment out the next line.
+__sethist
+EOF
+)"
+fi
+
# For some reason, 30 tends to be a common "default" setting for this when not manually specified on shitty systems
if [[ "$HISTSIZE" == "30" ]]; then
HISTSIZE="10000"