diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 7f9f1f5..afb13ef 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -203,7 +203,9 @@ function zvm_after_init() { echo $$ > /tmp/ssh_sessions/"$SSH_SESSION_ID" fi if [ "$REMOTE_PATH" != "" ]; then - cd "$REMOTE_PATH" + if [ -d "$REMOTE_PATH" ]; then + cd "$REMOTE_PATH" + fi elif [ "$PREVIOUS_SESSION_ID" != "" ]; then cd "$(readlink -e /proc/$(cat /tmp/ssh_sessions/$PREVIOUS_SESSION_ID)/cwd)" fi