5

I normally use Github for my dotfiles. For a gem I am working on, I need to add some private keys to my .zshrc.

Is there a way for me to include another file in my .zshrc, where I can store my environment variables in that included file?

ogirginc
  • 4,948
  • 3
  • 31
  • 45

1 Answers1

14

Yes, by using the source command:

# environment variables
source ~/.zsh_env_vars
Anthony
  • 15,435
  • 4
  • 39
  • 69
  • 1
    Note for newbies like myself: Syntax for ENVs in shell is different from using ENVs in Ruby or Rails projects: `export MY_ENV_VARIABLE_NAME="xxxxxxxxxxxxxxxx"`. – ogirginc Mar 21 '17 at 07:00