From 1ecfef1ea82c14a3279109a9b27070a0039bee19 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sat, 11 Jan 2025 01:06:30 +0100 Subject: [PATCH] Unset cmd env before running it --- modules/cli/zsh/init.zsh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/cli/zsh/init.zsh b/modules/cli/zsh/init.zsh index 1d4fea4..7bddf81 100644 --- a/modules/cli/zsh/init.zsh +++ b/modules/cli/zsh/init.zsh @@ -166,6 +166,11 @@ ZLE_RPROMPT_INDENT=0 # execute arbitrary commands on startup since `zsh -sc` is not a real option :c if [[ -n CMD ]]; then - eval $CMD + # unset the cmd before executing it (for long processes) + cmd=$CMD unset CMD + if [[ -n $TMUX ]]; then + tmux set-environment -r CMD + fi + eval $cmd fi