fix(history): Change set to setopt
Kinda borked the history settings by using set instead of setopt mia culpa Fixed now
This commit is contained in:
parent
d99aa241fe
commit
a79e9e988f
21
history
21
history
|
|
@ -1,19 +1,25 @@
|
||||||
## History Configuration
|
## History Configuration
|
||||||
|
|
||||||
|
[ ! -d $XDG_STATE_HOME/zsh ] && mkdir -p $XDG_STATE_HOME/zsh
|
||||||
|
|
||||||
## Options relating to saving history
|
## Options relating to saving history
|
||||||
export HISTSIZE=10000
|
export HISTSIZE=10000
|
||||||
export SAVEHIST=6000
|
export SAVEHIST=6000
|
||||||
export HISTFILE=$XDG_STATE_HOME/zsh/history
|
export HISTFILE=$XDG_STATE_HOME/zsh/history
|
||||||
|
|
||||||
set hist_ignore_dups ## Don't log the same thing twice
|
setopt extended_history ## Save timestamp in history
|
||||||
set hist_ignore_space ## Don't log things that start with space
|
setopt inc_append_history_time ## incrementally append to history
|
||||||
set hist_reduce_blanks ## Compact unnecessary white-space
|
## This option means that the history is updated by all shell sessions
|
||||||
set hist_expire_dups_first ## Remove duplicates first (if any exist) when compacting history
|
## However it doesn't load them in like share_history does
|
||||||
set hist_save_no_dups ## Remove duplicates from history when writing
|
setopt hist_ignore_dups ## Don't log the same thing twice
|
||||||
|
setopt hist_ignore_space ## Don't log things that start with space
|
||||||
|
setopt hist_reduce_blanks ## Compact unnecessary white-space
|
||||||
|
setopt hist_expire_dups_first ## Remove duplicates first (if any exist) when compacting history
|
||||||
|
setopt hist_save_no_dups ## Remove duplicates from history when writing
|
||||||
|
|
||||||
## Options relating to history use
|
## Options relating to history use
|
||||||
set hist_find_no_dups ## Don't show duplicates when searching history
|
setopt hist_find_no_dups ## Don't show duplicates when searching history
|
||||||
set hist_verify ## Dont' immediately execute expanded history `eg: sudo !!`
|
setopt hist_verify ## Dont' immediately execute expanded history `eg: sudo !!`
|
||||||
|
|
||||||
## This stops certain commands saving into the history file
|
## This stops certain commands saving into the history file
|
||||||
export HISTORY_IGNORE='(cd(| *)|ls(| *)|pushd(| *)|popd(| *))'
|
export HISTORY_IGNORE='(cd(| *)|ls(| *)|pushd(| *)|popd(| *))'
|
||||||
|
|
@ -24,3 +30,4 @@ zshaddhistory() {
|
||||||
emulate -L zsh
|
emulate -L zsh
|
||||||
[[ ${1%%$'\n'} != ${~HISTORY_IGNORE} ]]
|
[[ ${1%%$'\n'} != ${~HISTORY_IGNORE} ]]
|
||||||
}
|
}
|
||||||
|
# vim: ft=zsh
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user