I have a variable set exactly like this:
export VARIABLE_NAME=VARIABLE_VALUE
I thought it would be in ~/.zshrc
or bash_profile
but it is seen in none of those. I am now struggling to understand where its getting set and I want to reset it up. Can someone suggest easy way to do so? I am on MacOS
I am using zsh
shell. I know the command called unset VARIABLE_NAME
. However I am looking into finding root cause and removing the variable from the first place where its been set.
Variable name is JWT_SECRET
Update:
I tried running grep JWT_SECRET {~/.z,/etc/z}{shenv,profile,shrc,login}
as proposed by @nohillside
I have configured my zsh to use ohmyzsh.
Here's how output looks like:
When I do: echo $SHELL $ZSH_VERSION $BASH_VERSION
I get: /bin/zsh 5.9
Here's what I have in my ~/.zshrc:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
DISABLE_AUTO_TITLE="true"
PS1="%1d %& # "
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="robbyrussell"
ENABLE_CORRECTION="true"
plugins=(git)
source $ZSH/oh-my-zsh.sh
export SU_PASSWORD=<PASSWORD>
export SU_USERNAME=<USERNAME>
export PATH="/Users/<username>/bin:$PATH"
~/.zshrc
obviously, so as a next step, look into that one to see where it calls additional commands which could set env variables.. "$NVM_DIR/nvm.sh"
seems to be a good candidate for this.source
multiple times but it appeared everytime. I restarted my system and now variable seems to have disappeared. Thanks a lot @nohillside for helping me out here!!!