1

I want to keep my ~/.zshrc in a github repo, and since I don't want to make my ~ folder a git repository, I plan to move my ~/.zshrc to a folder called rc and then include source ./rc/.zshrc in my ~/.zshrc file.

I'm wondering if there's any reason to keep everything within the actual ~/.zshrc file instead of moving it to ~/rc/.zshrc


I use an Intel mac, could possibly use the .zshrc on a cloud server with ubuntu, and will probably get a mac with an M chip in the next few years if that's relevant

1 Answer 1

2

I'm wondering if there's any reason to keep everything within the actual ~/.zshrc file instead of moving it to ~/rc/.zshrc.

No, there's no need.

And there are other options as well:

  • Make ~/.zshrc a link to ~/rc/.zshrc.
  • Put ZDOTDIR=~/rc in ~/.zshenv. Then all other zsh initialization files like .zprofile, .zshrc, .zlogin, etc. will read from ~/.rc.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.