From 4bb111c3bb5131dad2849c73bfa049baa71d08f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pankowski?= Date: Sat, 2 Dec 2023 23:03:16 +0100 Subject: [PATCH] zsh: history options, in particular share history --- shell/.zshrc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/shell/.zshrc b/shell/.zshrc index 97737c9..c60869f 100644 --- a/shell/.zshrc +++ b/shell/.zshrc @@ -30,6 +30,21 @@ zstyle ':vcs_info:*' enable git PS1='%B%F{blue}%n@%m%f ${vcs_info_msg_0_}%B%#%f%b ' RPROMPT='%(?..%B%F{red}%?%f%b)' +# History. + +HISTFILE=${ZDOTDIR:-~}/.zsh_history +HISTSIZE=10000 +SAVEHIST=10000 +setopt append_history +setopt extended_history +setopt hist_expire_dups_first +setopt hist_find_no_dups +setopt hist_ignore_all_dups +setopt hist_ignore_space +setopt hist_reduce_blanks +setopt inc_append_history +setopt share_history + # Aliases. for f in ~/.config/shellconfig/*.sh(N) ~/.config/shellconfig/*.zsh(N); do source "$f"; done