zellij init bug workaround

This commit is contained in:
Petr Nyc
2026-02-26 11:26:49 +01:00
parent ee48da8eaa
commit 501aea9cea

14
.zshrc
View File

@@ -305,6 +305,20 @@ fi
export GPG_TTY=$(tty)
# zellij startup workaround:
# keep zellij aliases/functions while stripping the problematic runtime completion call.
_zellij_comp_src="$HOME/.config/zellij/comp.zsh"
_zellij_comp_safe="$HOME/.cache/zellij/comp.safe.zsh"
if [ -f "$_zellij_comp_src" ]; then
mkdir -p "${_zellij_comp_safe:h}"
if [ ! -f "$_zellij_comp_safe" ] || [ "$_zellij_comp_src" -nt "$_zellij_comp_safe" ]; then
sed '/^_zellij "\$@"$/d' "$_zellij_comp_src" > "$_zellij_comp_safe"
fi
source "$_zellij_comp_safe"
(( $+functions[compdef] )) && compdef _zellij zellij
fi
unset _zellij_comp_src _zellij_comp_safe
### MANAGED BY RANCHER DESKTOP START (DO NOT EDIT)
# export PATH="/Users/jetpac/.rd/bin:$PATH"
### MANAGED BY RANCHER DESKTOP END (DO NOT EDIT)