From ea61ff5dd507507591f8a0efa9f13812a46bfb02 Mon Sep 17 00:00:00 2001 From: Luna Komorebi Date: Fri, 7 Jun 2024 12:32:12 +0200 Subject: [PATCH] refactor .zshrc --- .zshrc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.zshrc b/.zshrc index fff21e2..afb376c 100644 --- a/.zshrc +++ b/.zshrc @@ -1,7 +1,5 @@ DISABLE_AUTO_UPDATE=true -autoload -Uz compinit && compinit - iscmd() { command -v "$1" > /dev/null } @@ -39,11 +37,14 @@ else plugins="$HOME/.local/share/zsh-plugins" fi +# Load completions +autoload -Uz compinit && compinit ## History file configuration HISTFILE="$HOME/.zsh_history" HISTSIZE=50000000 -SAVEHIST=10000000 +SAVEHIST=$HISTSIZE +HISTDUP=erase ## History command configuration setopt extended_history # record timestamp of command in HISTFILE @@ -51,6 +52,8 @@ setopt hist_expire_dups_first # delete duplicates first when HISTFILE size excee setopt hist_ignore_dups # ignore duplicated commands history list setopt hist_ignore_space # ignore commands that start with space setopt hist_verify # show command with history expansion to user before running it +setopt appendhistory +setopt sharehistory if iscmd helix; then export EDITOR=helix