Using multiple .netrc files by instrumenting HOME
Most Unix tools/convention can have their default overridden by environment variables. Below, .netrc and the HOME variable:
franck@zeu ~ % HOME=.ssh/heroku-franck heroku apps
=== My Apps
...
=== Collaborated Apps
[redacted]
franck@zeu ~ % HOME=.ssh/heroku-evome heroku apps
You have no apps.
# https://gist.github.com/franckverrot/8783182
FWIW, I store my .netrc files in .ssh.
And of course, it's easy add some sugar to avoid typing "HOME=/thepath", but I don't bother doing it.
Written by Franck Verrot
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#