0

I wanted to change $PATH and I did not pay attention to shell, so I changed $PATH in .bashrc instead and not in the dotfile for zsh. Now when I wanted to find it and change it, I cannot find any file that contains my current path that I get when run echo $PATH.

I tried the following dot files:

etc/zprofile

etc/zshrc

.zsh_sessions

.zprofile

All of these are empty when trying to run vim <file_name>

3
  • 1
    You indicated you changed .bashrc but then didn’t list it as a file you looked at later. Should we assume you looked in ~/.bashrc? Dec 31, 2022 at 21:31
  • Yes, I looked in it and it was completely empty. Despite that, I added my path, saved the file, then run source ~/.bashrc and then it works, but ONLY in the current terminal session. If I open a new tab, this file is not sourced anymore
    – BlueBubbl
    Jan 3, 2023 at 3:43

1 Answer 1

0

.bashrc is not a zsh init file, so that is why it's not working. You want to change .zshrc instead. There is a default value for $PATH although I can't find out what it is in the zsh documentation.

2
  • What if I don't have a .zshrc file?
    – BlueBubbl
    Jan 11, 2023 at 23:43
  • You can create it. I think I misunderstood your original question, though.
    – Heptite
    Jan 12, 2023 at 17:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .