Organize history.zsh file and improve comments

This commit is contained in:
Marc Cornellà 2014-12-13 23:31:56 +01:00
parent 94baa9eadd
commit 643bb25a0d

View file

@ -1,8 +1,3 @@
## Command history configuration
[ -z "$HISTFILE" ] && HISTFILE="$HOME/.zsh_history"
HISTSIZE=10000
SAVEHIST=10000
## History wrapper ## History wrapper
function omz_history { function omz_history {
# Delete the history file if `-c' argument provided. # Delete the history file if `-c' argument provided.
@ -23,11 +18,17 @@ case $HIST_STAMPS in
*) alias history='omz_history' ;; *) alias history='omz_history' ;;
esac esac
setopt append_history ## History file configuration
setopt extended_history [ -z "$HISTFILE" ] && HISTFILE="$HOME/.zsh_history"
setopt hist_expire_dups_first HISTSIZE=10000
setopt hist_ignore_dups # ignore duplication command history list SAVEHIST=10000
setopt hist_ignore_space
setopt hist_verify ## History command configuration
setopt inc_append_history setopt append_history # append history to HISTFILE on session exit
setopt extended_history # record timestamp of command in HISTFILE
setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE
setopt hist_ignore_dups # ignore duplicated commands history list
setopt hist_ignore_space # ignore commands that start with space
setopt hist_verify # show command with history expansion to user before running it
setopt inc_append_history # add commands to HISTFILE in order of execution
setopt share_history # share command history data setopt share_history # share command history data