thoughtbot / dotfiles

A set of vim, zsh, git, and tmux configuration files.
https://thoughtbot.com
Other
7.97k stars 1.87k forks source link

What's the recommended way to add binaries to $PATH? #701

Closed PaulRBerg closed 2 years ago

PaulRBerg commented 2 years ago

I love this repo but I'm new to zsh and I'm not quite sure what's the best place to add my binaries to the $PATH. In Bash, I used to do that in .bash_profile. Is .zshrc the zsh analogue? Or .zshenv?

Side note: it might be worth it to enable discussions in this repository. I would have opened a discussion instead of an issue.

geoffharcourt commented 2 years ago

We set the path in .zsh/configs/post/path.zsh. You could set your own by layering in a file in zsh/configs/post that runs after that, or you could set it in your own .zshrc.local file, which gets loaded after the configs directory's contents get loaded.

Check out the files here to see the way this gets loaded: https://github.com/thoughtbot/dotfiles/blob/42a313bde1f4dc7a75cc276714008c77bf3821bf/zshrc#L8-L38

PaulRBerg commented 2 years ago

Thanks for your answer, @geoffharcourt. Going to close this issue now.