HISTFILE=~/.histfile
HISTSIZE=100000
SAVEHIST=100000

setopt hist_ignore_space
setopt inc_append_history
setopt share_history
setopt extendedhistory

# disable "!" history expansion, "!" shall be a normal character
set +o histexpand

source ~/.zsh/zsh-histdb/sqlite-history.zsh
source ~/.zsh/zsh-histdb/history-timer.zsh

autoload -Uz add-zsh-hook
add-zsh-hook preexec _start_timer
add-zsh-hook precmd  _stop_timer