Skip to main content
1 of 3
jesse_b
  • 41.6k
  • 14
  • 108
  • 163

This morning I moved a bunch of personal information out of my bash_profile and bashrc and added them to a new file I call privaterc.

In my privaterc file I set this variable:

PRIVATERC_RUN=yes 

Now in my bash_profile I have added this line:

[[ $PRIVATERC_RUN != yes && -f ~/.privaterc ]] && source ~/.privaterc

This will cause privaterc to only be sourced if it hasn't previously been sourced in this shell.

jesse_b
  • 41.6k
  • 14
  • 108
  • 163