Additional comments in cursor shapes

I found out that setting cursor shapes may cause problem with st and their default TERM (at least for me), so I added a comment to make it clear. Also added list of different cursors shapes.
This commit is contained in:
h3xo 2022-04-02 10:20:43 +02:00 committed by GitHub
parent cd473390f6
commit 20d8e33725
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,7 +35,7 @@ bindkey -M menuselect 'l' vi-forward-char
bindkey -M menuselect 'j' vi-down-line-or-history
bindkey -v '^?' backward-delete-char
# Change cursor shape for different vi modes.
# Change cursor shape for different vi modes. It may possibly brake st TERM hence it uses xterm
function zle-keymap-select () {
case $KEYMAP in
vicmd) echo -ne '\e[1 q';; # block
@ -51,6 +51,16 @@ zle -N zle-line-init
echo -ne '\e[5 q' # Use beam shape cursor on startup.
preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt.
### List of cursor styles
### 0 ===> blinking block.
### 1 ===> blinking block.
### 2 ===> steady block.
### 3 ===> blinking underline.
### 4 ===> steady underline.
### 5 ===> blinking bar, xterm.
### 6 ===> steady bar, xterm.
# Use lf to switch directories and bind it to ctrl-o
lfcd () {
tmp="$(mktemp)"