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