summaryrefslogtreecommitdiffstats
path: root/dot_config
diff options
context:
space:
mode:
Diffstat (limited to 'dot_config')
-rw-r--r--dot_config/zsh/aliasrc2
-rw-r--r--dot_config/zsh/dot_zshenv2
-rw-r--r--dot_config/zsh/dot_zshrc7
3 files changed, 7 insertions, 4 deletions
diff --git a/dot_config/zsh/aliasrc b/dot_config/zsh/aliasrc
index 5b933ed..75903ee 100644
--- a/dot_config/zsh/aliasrc
+++ b/dot_config/zsh/aliasrc
@@ -12,7 +12,7 @@
# sudo not required for some system commands
for x in mount umount sv emerge apt pacman updatedb su ; do
# shellcheck disable=SC2139
- alias $x='sudo $x'
+ alias $x="sudo $x"
done
if command -v doas >/dev/null 2>&1
diff --git a/dot_config/zsh/dot_zshenv b/dot_config/zsh/dot_zshenv
index 29838fc..47236cf 100644
--- a/dot_config/zsh/dot_zshenv
+++ b/dot_config/zsh/dot_zshenv
@@ -16,7 +16,7 @@ else
fi
# Use TUI editor for git
-export GIT_EDITOR="$EDITOR"
+[ -z "$GIT_EDITOR" ] && export GIT_EDITOR="$EDITOR"
# Default programs for SSH or not
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
export BROWSER="w3m"
diff --git a/dot_config/zsh/dot_zshrc b/dot_config/zsh/dot_zshrc
index a592706..296d368 100644
--- a/dot_config/zsh/dot_zshrc
+++ b/dot_config/zsh/dot_zshrc
@@ -39,8 +39,11 @@ setopt interactive_comments
setopt complete_aliases
# History in cache directory:
-HISTSIZE=100000000
-SAVEHIST=100000000
+HISTSIZE=999999999
+SAVEHIST=$HISTSIZE
+if [ -z "$XDG_STATE_HOME/zsh" ]; then
+ mkdir -p "$XDG_STATE_HOME/zsh"
+fi
HISTFILE="$XDG_STATE_HOME"/zsh/history
setopt BANG_HIST # Treat the '!' character specially during expansion.
setopt EXTENDED_HISTORY # Write the history file in the ":start:elapsed;command" format.