From 14219cda272428c5640ebd7e03644ae83f19fda4 Mon Sep 17 00:00:00 2001 From: adlee-was-taken Date: Tue, 7 Apr 2026 18:44:29 -0400 Subject: [PATCH] Fix zle-line-init error when connecting via SSH Guard zle -N widget registration behind function existence checks, since oh-my-zsh plugins that define these functions may not be loaded yet depending on shell init order (e.g. over SSH). Co-Authored-By: Claude Opus 4.6 (1M context) --- zsh/themes/adlee.zsh-theme | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zsh/themes/adlee.zsh-theme b/zsh/themes/adlee.zsh-theme index 656e8e2..7490659 100644 --- a/zsh/themes/adlee.zsh-theme +++ b/zsh/themes/adlee.zsh-theme @@ -125,9 +125,9 @@ autoload -Uz add-zsh-hook add-zsh-hook preexec adlee_preexec add-zsh-hook precmd adlee_precmd -# Configure ZLE -zle -N zle-line-init -zle -N zle-keymap-select +# Configure ZLE (only register widgets if the functions exist, e.g. from vi-mode plugin) +(( ${+functions[zle-line-init]} )) && zle -N zle-line-init +(( ${+functions[zle-keymap-select]} )) && zle -N zle-keymap-select # Initial prompt build (critical for tmux) _adlee_build_prompt