diff options
author | Marc Cornellà <marc.cornella@live.com> | 2014-12-13 23:31:56 +0100 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2018-04-22 15:32:02 +0200 |
commit | 643bb25a0d2bd5c2ef316a88021e1ac4eb156bf8 (patch) | |
tree | 2e7e13a50a1330b95ef4983a26c81fe45e501760 /lib/history.zsh | |
parent | 94baa9eadd05038a343bfd99f01493123f5a1526 (diff) | |
download | zsh-643bb25a0d2bd5c2ef316a88021e1ac4eb156bf8.tar.gz zsh-643bb25a0d2bd5c2ef316a88021e1ac4eb156bf8.tar.bz2 zsh-643bb25a0d2bd5c2ef316a88021e1ac4eb156bf8.zip |
Organize history.zsh file and improve comments
Diffstat (limited to 'lib/history.zsh')
-rw-r--r-- | lib/history.zsh | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/lib/history.zsh b/lib/history.zsh index 058a1a319..da1e02ddf 100644 --- a/lib/history.zsh +++ b/lib/history.zsh @@ -1,8 +1,3 @@ -## Command history configuration -[ -z "$HISTFILE" ] && HISTFILE="$HOME/.zsh_history" -HISTSIZE=10000 -SAVEHIST=10000 - ## History wrapper function omz_history { # Delete the history file if `-c' argument provided. @@ -23,11 +18,17 @@ case $HIST_STAMPS in *) alias history='omz_history' ;; esac -setopt append_history -setopt extended_history -setopt hist_expire_dups_first -setopt hist_ignore_dups # ignore duplication command history list -setopt hist_ignore_space -setopt hist_verify -setopt inc_append_history -setopt share_history # share command history data +## History file configuration +[ -z "$HISTFILE" ] && HISTFILE="$HOME/.zsh_history" +HISTSIZE=10000 +SAVEHIST=10000 + +## History command configuration +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 |