4 # Set up command line history functions
6 # Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
7 # Released under the terms of the Artistic Licence 2.0
9 # Source repository: git://git.madduck.net/etc/zsh.git
12 # typeset -g on this one to make warn_create_global happy
13 typeset -g HISTFILE=$ZVARDIR/history-$HOST
14 [[ -e $ZVARDIR/history ]] && mv $ZVARDIR/history $HISTFILE
19 # treat ! specially like csh did
22 # ignore duplicates in the history
23 setopt hist_ignore_dups
25 # save timestamp and duration with each event
26 setopt extended_history
28 # properly lock the file on write, if that option exists
29 setopt hist_fcntl_lock 2>/dev/null
31 # skip over non-contiguous duplicates when searching history
32 setopt hist_find_no_dups
34 # don't store commands starting with a space in the history file
35 setopt hist_ignore_space
37 # don't store history/fc -l invocations
40 # remove superfluous blanks from each command line
41 setopt hist_reduce_blanks