I had previous changed the default directory my terminal opens up in to a specific sub folder in Documents no matter when or how you open a new terminal. I want to reset it back to the default behavior and I'm don't remember how I set the default to begin with.
Are there any other places that could setting my terminal directory on start up?
I've already reset the terminal profile back to to the default, checked $HOME is still default, and checked my .zshrc and .zprofile but don't see anything there that would change the default directory on start up.
.zshrc
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="/usr/local/opt/node@14/bin:$PATH"
export PATH="/usr/local/opt/[email protected]/bin:$PATH"
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
export PATH="$HOME/.local/bin:$PATH"
.zprofile
# Setting PATH for Python 2.7
# The original version is saved in .zprofile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH
alias python=python3
# Setting PATH for Python 3.10
# The original version is saved in .zprofile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.10/bin:${PATH}"
export PATH
Update:
I found that in .zshenv would grab from .bash_profile, and in my .bash_profile there was a CD command to would set my directory. So even if you're using zshell you might be some things running from you bash settings.
/bin/zsh -x
. It'll get very verbose every time you issue a command, but will enable you to scroll back to the beginning and see if there is any reference to changingDocuments
./etc/zprofile
,/etc/zshrc
, and/etc/zshrc_Apple_Terminal
.: ${shell_session_save_user_state_functions:=}
into your .zhsrc, then close all open zsh, create one new zsh, close this as well, and then open a new zsh once more. If you are lucky, the problem is gone.export SHELL_SESSIONS_DISABLE=1
.