diff options
author | Matt Strapp <matt@mattstrapp.net> | 2024-12-06 09:34:00 -0600 |
---|---|---|
committer | Matt Strapp <matt@mattstrapp.net> | 2024-12-06 09:34:00 -0600 |
commit | 35845dc0c2d291e7a15278ef3f7d79956cbbaf68 (patch) | |
tree | 8c83f2ae84d5af036b891d4b1e01d8e538241b91 /dot_config/zsh/executable_dot_zshopts | |
parent | export (diff) | |
download | dotfiles-35845dc0c2d291e7a15278ef3f7d79956cbbaf68.tar dotfiles-35845dc0c2d291e7a15278ef3f7d79956cbbaf68.tar.gz dotfiles-35845dc0c2d291e7a15278ef3f7d79956cbbaf68.tar.bz2 dotfiles-35845dc0c2d291e7a15278ef3f7d79956cbbaf68.tar.lz dotfiles-35845dc0c2d291e7a15278ef3f7d79956cbbaf68.tar.xz dotfiles-35845dc0c2d291e7a15278ef3f7d79956cbbaf68.tar.zst dotfiles-35845dc0c2d291e7a15278ef3f7d79956cbbaf68.zip |
actually save all the history for real
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to '')
-rw-r--r-- | dot_config/zsh/executable_dot_zshopts | 25 |
1 files changed, 20 insertions, 5 deletions
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 |