aboutsummaryrefslogtreecommitdiff
path: root/05-options.zsh
diff options
context:
space:
mode:
Diffstat (limited to '05-options.zsh')
-rw-r--r--05-options.zsh35
1 files changed, 35 insertions, 0 deletions
diff --git a/05-options.zsh b/05-options.zsh
new file mode 100644
index 0000000..1b80a18
--- /dev/null
+++ b/05-options.zsh
@@ -0,0 +1,35 @@
+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