Using multiple commands on heroku CLI
Need to use multiple heroku CLI commands one after another and don’t want to type -a foo-bar-baz
every time?
Type export HEROKU_APP=foo-bar-baz
in terminal and then just happily run heroku command
on foo-bar-baz
application.
heroku pg:backups:capture -a foo-bar-baz
# is equivalent to:
export HEROKU_APP=foo-bar-baz
heroku pg:backups:capture
PS. After that you might want to unset HEROKU_APP
to remove variable.