From 501aea9cea9f4ef3fa36071e81d84b15c89299ff Mon Sep 17 00:00:00 2001 From: Petr Nyc Date: Thu, 26 Feb 2026 11:26:49 +0100 Subject: [PATCH] zellij init bug workaround --- .zshrc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.zshrc b/.zshrc index e76f93f..3e6bd50 100644 --- a/.zshrc +++ b/.zshrc @@ -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)