diff options
author | Josh Rahm <rahm@google.com> | 2021-11-11 12:27:44 -0700 |
---|---|---|
committer | Josh Rahm <rahm@google.com> | 2021-11-11 12:31:46 -0700 |
commit | 62d7881f27857401e868b2d19d4af9cb00ea4661 (patch) | |
tree | 0ecf21de9dd93f9dd28a4ea6ceb9ea27e92f34e9 /04-options.zsh | |
parent | b78c3b1f01685a58907f63445efa012a5cbc3566 (diff) | |
download | zshrcd-62d7881f27857401e868b2d19d4af9cb00ea4661.tar.gz zshrcd-62d7881f27857401e868b2d19d4af9cb00ea4661.tar.bz2 zshrcd-62d7881f27857401e868b2d19d4af9cb00ea4661.zip |
Add local folder. Add prompt change.
Diffstat (limited to '04-options.zsh')
-rw-r--r-- | 04-options.zsh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/04-options.zsh b/04-options.zsh index 35b0a85..e22f3c8 100644 --- a/04-options.zsh +++ b/04-options.zsh @@ -5,3 +5,24 @@ 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' +} |