Skip to content

Instantly share code, notes, and snippets.

@boscomonkey
Created October 22, 2010 01:08
Show Gist options
  • Save boscomonkey/639729 to your computer and use it in GitHub Desktop.
Save boscomonkey/639729 to your computer and use it in GitHub Desktop.
Switch between different Heroku accounts with Bash functions
# Set heroku account credentials where each account file is named ~/.heroku/credentials_XXX
# http://www.mail-archive.com/heroku@googlegroups.com/msg03850.html
function hset() {
ln -s ~/.heroku/credentials_$1 ~/.heroku/credentials
}
# Clear current Heroku account
function hclear() {
[ -L ~/.heroku/credentials ] && rm ~/.heroku/credentials
}
# List all Heroku accounts
function hlist() {
ls ~/.heroku/credentials_* | sed s:^.*/.heroku/credentials_::
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment