mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-13 03:01:32 +01:00
Add heroku alias for setting app or remote name
This commit is contained in:
parent
d485044169
commit
6ffbdd1333
1 changed files with 20 additions and 0 deletions
|
|
@ -159,3 +159,23 @@ _arguments \
|
|||
'(--remote)--remote[the remote name]' \
|
||||
&& return 0
|
||||
|
||||
# Alias overriding default "heroku" command to ease setting app or remote name.
|
||||
#
|
||||
# heroku @@foo info -> heroku info -a foo
|
||||
# heroku @foo info -> heroku info -r foo
|
||||
|
||||
heroku() {
|
||||
if [ $# -gt 0 ] && [ ${1:0:2} = "@@" ]
|
||||
then
|
||||
app=${1:2}
|
||||
shift
|
||||
command heroku $@ -a $app
|
||||
elif [ $# -gt 0 ] && [ ${1:0:1} = "@" ]
|
||||
then
|
||||
remote=${1:1}
|
||||
shift
|
||||
command heroku $@ -r $remote
|
||||
else
|
||||
command heroku $@
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue