From 589f310ef894728361a9589953d623a490884c88 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Wed, 4 Oct 2023 23:45:36 +0200 Subject: [PATCH] zsh: revert to simpler widget naming --- config/zsh/line-editor.zsh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/config/zsh/line-editor.zsh b/config/zsh/line-editor.zsh index 73b039b..81a9056 100644 --- a/config/zsh/line-editor.zsh +++ b/config/zsh/line-editor.zsh @@ -16,20 +16,19 @@ set_cursor_shape() { } # Start new prompts with bar shaped cursor. -init_line_editor() { +zle-line-init() { set_cursor_shape bar } +zle -N zle-line-init # Switch cursor shape depending on editing mode. -keymap_did_change() { +zle-keymap-select() { case $KEYMAP in vicmd) set_cursor_shape block ;; viins|main) set_cursor_shape bar ;; esac } - -zle -N zle-line-init init_line_editor -zle -N zle-keymap-select keymap_did_change +zle -N zle-keymap-select # Use vi mode for line editing. bindkey -v