]> git.sev.monster Git - dotfiles.git/blobdiff - base/.zsh/functions/Prompts/prompt_arrows_setup
code cleanup, add su support
[dotfiles.git] / base / .zsh / functions / Prompts / prompt_arrows_setup
index 77313c070d8263eaebe922560c51d338a51efd7c..9b935f1ea10a7a9a5bd4059e4e77d341827b1108 100644 (file)
@@ -71,14 +71,16 @@ function prompt_arrows_setup() {
     zstyle ':vcs_info:git*' stagedstr   "%F{$c}+"
     zstyle ':vcs_info:git*' unstagedstr "%F{$r}*"
 
+    # add-zsh-hook should have already been autoloaded by promptinit
     add-zsh-hook precmd prompt_arrows_precmd
     add-zsh-hook preexec prompt_arrows_preexec
-    zle -N zle-line-init
-    zle -A zle-line-init zle-keymap-select
+    autoload -Uz add-zle-hook-widget
+    add-zle-hook-widget line-init prompt_arrows_keymap_select
+    add-zle-hook-widget keymap-select prompt_arrows_keymap_select
 }
 
 # change color based on zle vi mode
-function zle-line-init {
+function prompt_arrows_keymap_select {
     prompt_arrows_vimode="${KEYMAP:/(main|viins)/}"
     zle reset-prompt
 }
This page took 0.144308 seconds and 4 git commands to generate.