Open Loukious opened 4 years ago
FYI, i added the following lines to my .zshrv
:
set-heroku-account() {
local heroku_account_setting_path=".heroku_account"
if [ -f "${heroku_account_setting_path}" ]; then
local heroku_account="$(cat "${heroku_account_setting_path}")"
echo "Using heroku account ${heroku_account}"
heroku accounts:set $heroku_account
fi
}
add-zsh-hook chpwd set-heroku-account
set-heroku-account
Now, adding a .heroku_account
file in a folder, containing the account I want to use, makes my bash switch automatically
It would be nice if we could assign different accounts to different directories for dealing with different projects where each is on a different account.