From 1433162ffd135f122755d1088102d8b795a635b7 Mon Sep 17 00:00:00 2001 From: Wryn Wagner Date: Tue, 21 Sep 2021 11:49:08 -0600 Subject: [PATCH] support project folders which are directly the project --- zsh/activate.zsh | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/zsh/activate.zsh b/zsh/activate.zsh index d7b7208..fe1e7d9 100644 --- a/zsh/activate.zsh +++ b/zsh/activate.zsh @@ -18,11 +18,13 @@ _CA__ACTIVATE() { [ ! -d $PROJECT_PATH ] && return 1 local SOURCE_PATH="$PROJECT_PATH/$_CA__SOURCE_DIR_NAME" - [ ! -d $SOURCE_PATH ] && return 1 - - _CA__ACTIVATE_VIRTUAL_ENV $PROJECT_PATH - _CA__ACTIVATE_CUSTOM_ENV $PROJECT_PATH - _CA__ACTIVATE_SOURCE_PATH $SOURCE_PATH + [ -d $SOURCE_PATH ] && { + _CA__ACTIVATE_VIRTUAL_ENV $PROJECT_PATH + _CA__ACTIVATE_CUSTOM_ENV $PROJECT_PATH + cd $SOURCE_PATH + } || { + cd $PROJECT_PATH + } _CA__TMUX_WINDOW_RENAME $PROJECT return 0 @@ -50,11 +52,6 @@ _CA__ACTIVATE_CUSTOM_ENV() { source $CUSTOM_ENV } -_CA__ACTIVATE_SOURCE_PATH() { - local SOURCE_PATH="$1" - cd $SOURCE_PATH -} - ##################################################################### export _CA__ACTIVATE_LOADED=1