643bb25a0d2bd5c2ef316a88021e1ac4eb156bf8

Author
Marc Cornellà <marc.cornella@live.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

Organize history.zsh file and improve comments

Diff

 1diff --git a/lib/history.zsh b/lib/history.zsh
 2index 058a1a31978482bc321770d9fa4ab3c859b973ee..da1e02ddff9a02d8b4fbef0d02d9b9b37e458937 100644
 3--- a/lib/history.zsh
 4+++ b/lib/history.zsh
 5@@ -1,8 +1,3 @@
 6-## Command history configuration
 7-[ -z "$HISTFILE" ] && HISTFILE="$HOME/.zsh_history"
 8-HISTSIZE=10000
 9-SAVEHIST=10000
10-
11 ## History wrapper
12 function omz_history {
13   # Delete the history file if `-c' argument provided.
14@@ -23,11 +18,17 @@ case $HIST_STAMPS in
15   *) alias history='omz_history' ;;
16 esac
17 
18-setopt append_history
19-setopt extended_history
20-setopt hist_expire_dups_first
21-setopt hist_ignore_dups # ignore duplication command history list
22-setopt hist_ignore_space
23-setopt hist_verify
24-setopt inc_append_history
25-setopt share_history # share command history data
26+## History file configuration
27+[ -z "$HISTFILE" ] && HISTFILE="$HOME/.zsh_history"
28+HISTSIZE=10000
29+SAVEHIST=10000
30+
31+## History command configuration
32+setopt append_history         # append history to HISTFILE on session exit
33+setopt extended_history       # record timestamp of command in HISTFILE
34+setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE
35+setopt hist_ignore_dups       # ignore duplicated commands history list
36+setopt hist_ignore_space      # ignore commands that start with space
37+setopt hist_verify            # show command with history expansion to user before running it
38+setopt inc_append_history     # add commands to HISTFILE in order of execution
39+setopt share_history          # share command history data