From 23ba15e09e0ab446051e6f4ee1797eb780ee73f3 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Fri, 17 Apr 2026 10:53:30 +0100 Subject: feat: add history hardening and directory stack options History: - extended_history: save timestamps per entry - share_history: share across concurrent sessions - hist_ignore_all_dups: remove older duplicate on new entry - hist_find_no_dups: skip duplicates when searching - hist_reduce_blanks: trim superfluous whitespace - hist_ignore_space: leading space = private command Navigation: - auto_pushd: cd pushes onto dir stack (cd - to browse) - pushd_ignore_dups: don't push duplicate dirs --- home/.config/zsh/.zshrc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/home/.config/zsh/.zshrc b/home/.config/zsh/.zshrc index 1bd253e..06de64f 100644 --- a/home/.config/zsh/.zshrc +++ b/home/.config/zsh/.zshrc @@ -11,12 +11,20 @@ setopt extendedglob # extended glob patterns (#, ~, ^) setopt interactivecomments # allow # comments in interactive shell setopt rmstarsilent # don't confirm rm * setopt prompt_subst # expand variables/functions in prompt +setopt auto_pushd # cd pushes old dir onto stack (cd - to browse) +setopt pushd_ignore_dups # don't push duplicate dirs onto stack unsetopt beep # no terminal bell # ── History ─────────────────────────────────────────────────────────────────── HISTFILE="$XDG_STATE_HOME/zsh/history" HISTSIZE=50000 SAVEHIST=50000 +setopt extended_history # save timestamp and duration per entry +setopt share_history # share history across concurrent sessions +setopt hist_ignore_all_dups # remove older duplicate when adding new entry +setopt hist_find_no_dups # skip duplicates when searching history +setopt hist_reduce_blanks # trim superfluous whitespace from entries +setopt hist_ignore_space # commands starting with space are not saved # ── Emacs keybindings ───────────────────────────────────────────────────────── bindkey -e -- cgit v1.2.3-70-g09d2