zstyle ':completion:*' menu select zmodload zsh/complist zstyle ':completion:*' matcher-list '' \ 'm:{a-z\-}={A-Z\_}' \ 'r:[^[:alpha:]]||[[:alpha:]]=** r:|=* m:{a-z\-}={A-Z\_}' \ 'r:|?=** m:{a-z\-}={A-Z\_}' # Change cursor shape for different vi modes. function zle-keymap-select { if [[ ${KEYMAP} == vicmd ]] || [[ $1 = 'block' ]]; then echo -ne '\e[1 q' elif [[ ${KEYMAP} == main ]] || [[ ${KEYMAP} == viins ]] || [[ ${KEYMAP} = '' ]] || [[ $1 = 'beam' ]]; then echo -ne '\e[5 q' fi } zle -N zle-keymap-select # Use beam shape cursor on startup. echo -ne '\e[5 q' _fix_cursor() { echo -ne '\e[5 q' } # History file. HISTFILE=~/.zsh_history HISTSIZE=100000 SAVEHIST=100000 setopt appendhistory setopt histverify setopt inc_append_history export HISTTIMEFORMAT="[%F %T]" setopt extended_history setopt hist_find_no_dups setopt hist_ignore_all_dups autoload -U +X compinit compinit -u