restore zsh window renaming process; insert activation sentinel when no custom-env exists

This commit is contained in:
Wryn Wagner 2021-09-21 12:26:31 -06:00
parent 409edf1bfd
commit 3ec0d46578
2 changed files with 8 additions and 0 deletions

View File

@ -23,6 +23,7 @@ _CA__ACTIVATE() {
_CA__ACTIVATE_CUSTOM_ENV $PROJECT_PATH
cd $SOURCE_PATH
} || {
export __CUSTOM_ENV_ACTIVE=420
cd $PROJECT_PATH
}

View File

@ -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=()