oh my zsh overwrites terminal start directory

Completed

I have an oh my zsh plugin active that remembers the last working directory, and opens the shell to that directory. This interferes with Ruby Mine opening the built in terminal to the current project's directory. I'd prefer to keep that plugin active for terminals outside of Ruby Mine. Is there anyway to access the Start directory variable from a zsh or bash script?

0
2 comments

Hello, Michael,

 

could you please check how it goes in case you disable 'Shell integration' in Settings -> Terminal (looks related to https://youtrack.jetbrains.com/issue/IDEA-163404).

0
Avatar
Permanently deleted user

I fixed the issue by exporting START_DIRECTORY in my main .zshrc, and cding to it before tmux starts up.

 

.zshrc

export START_DIRECTORY="$PWD"



.ZSH_CUSTOM/.customizations

if [[ $terminal == *"intellij"* ]]; then
  cd $START_DIRECTORY
  tmux new-session -d -n Console -s Intellij
  tmux attach-session -t Intellij -c '#{client_cwd}'
fi
0

Please sign in to leave a comment.