From 35845dc0c2d291e7a15278ef3f7d79956cbbaf68 Mon Sep 17 00:00:00 2001 From: Matt Strapp Date: Fri, 6 Dec 2024 09:34:00 -0600 Subject: actually save all the history for real Signed-off-by: Matt Strapp --- dot_config/zsh/executable_dot_zshopts | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'dot_config/zsh/executable_dot_zshopts') diff --git a/dot_config/zsh/executable_dot_zshopts b/dot_config/zsh/executable_dot_zshopts index 6756bfd..7eaf743 100644 --- a/dot_config/zsh/executable_dot_zshopts +++ b/dot_config/zsh/executable_dot_zshopts @@ -1,7 +1,17 @@ #! /usr/bin/env zsh + +# If you don't plan on reverting to bash, you can remove the link in ~/.profile +# to clean up. + +# create hist directory if it doesn't exist +if [ -z "$XDG_STATE_HOME/zsh" ]; then + mkdir -p "$XDG_STATE_HOME/zsh" +fi + # History settings -HISTSIZE=50000 -SAVEHIST=10000 +HISTSIZE=9999999999 +SAVEHIST=$HISTSIZE +HISTFILE="$XDG_STATE_HOME"/zsh/history setopt append_history # append the history setopt inc_append_history # append to history in the current @@ -18,11 +28,16 @@ setopt hist_find_no_dups # if we find dupes in the history, don't show setopt hist_reduce_blanks # remove blank lines from the command which # mean nothing to the shell +setopt HIST_VERIFY # Don't execute immediately upon history expansion. +setopt BANG_HIST # Treat the '!' character specially during expansion. + +setopt complete_aliases # complete aliases + # Disable this on boxes that are affected by bug # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=924736 # is-at-least 5.5 && unsetopt hist_reduce_blanks # bugfix is incoming, lets see what it does -# is-at-least 5.7.2 && setopt hist_reduce_blanks +is-at-least 5.7.2 && setopt hist_reduce_blanks setopt hist_ignore_space # lines starting with space don't go into the # history @@ -36,7 +51,7 @@ setopt notify # notify when a command returns exit code setopt no_beep # silence..! -#unsetopt auto_cd # disable $ ./bin as cd ./bin +setopt auto_cd # cd to a directory if it's the only argument setopt extendedglob # ls ^bla.* will not show ^bla.txt for example setopt correct # correct incorrent cmd's @@ -66,6 +81,6 @@ setopt auto_name_dirs # foo=/path/to/foo is the same as # hash -d foo=/path/to/foo # Misc -setopt interactivecomments # $ # foo doesn't become an error when hitting +setopt interactive_comments # $ # foo doesn't become an error when hitting # enter -- cgit v1.2.3