From 3ec0d465785a16eca8e2caf8b8a4caa511bd4ac9 Mon Sep 17 00:00:00 2001 From: Wryn Wagner Date: Tue, 21 Sep 2021 12:26:31 -0600 Subject: [PATCH] restore zsh window renaming process; insert activation sentinel when no custom-env exists --- zsh/activate.zsh | 1 + zsh/helpers.zsh | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/zsh/activate.zsh b/zsh/activate.zsh index fe1e7d9..86e7cb2 100644 --- a/zsh/activate.zsh +++ b/zsh/activate.zsh @@ -23,6 +23,7 @@ _CA__ACTIVATE() { _CA__ACTIVATE_CUSTOM_ENV $PROJECT_PATH cd $SOURCE_PATH } || { + export __CUSTOM_ENV_ACTIVE=420 cd $PROJECT_PATH } diff --git a/zsh/helpers.zsh b/zsh/helpers.zsh index 1af6073..43e6a9f 100644 --- a/zsh/helpers.zsh +++ b/zsh/helpers.zsh @@ -11,6 +11,8 @@ _CA__RESTORE_ENVIRONMENT() { [ $_CA__RESTORE_PATH ] && export PATH="$_CA__RESTORE_PATH" [ $_CA__RESTORE_ENV ] && for var in $_CA__RESTORE_ENV; do unset $var; done + _CA__TMUX_RESTORE_WINDOW_NAME + unset _CA__RESTORE_PATH _CA__RESTORE_ENV } @@ -36,6 +38,11 @@ _CA__TMUX_WINDOW_RENAME() { && tmux rename-window "$(dirname $PROJECT):$(basename $PROJECT)" } +_CA__TMUX_RESTORE_WINDOW_NAME() { + [[ $TERM =~ ^tmux- ]] \ + && tmux set automatic-rename on +} + _CA__SELECT_BASE_DIR() { local BASE_NAMES=()