From 20d8e33725968c7b1ff9c6c6618c4412df586b5d Mon Sep 17 00:00:00 2001 From: h3xo <82811246+h3xOo@users.noreply.github.com> Date: Sat, 2 Apr 2022 10:20:43 +0200 Subject: [PATCH] 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. --- .config/zsh/.zshrc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 22a166e7..ba814b0b 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -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)"