From fccaaf2fc60149baab966acaeae35f55325e6f98 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Thu, 8 Aug 2024 20:43:20 +0200 Subject: fix(heroku-alias): fix loading `heroku-alias` plugin and rework docs --- plugins/heroku-alias/README.md | 237 ++++++++++++++------------- plugins/heroku-alias/heroku-alias.plugin.zsh | 92 +++++++++++ plugins/heroku-alias/heroku.alias.sh | 92 ----------- 3 files changed, 217 insertions(+), 204 deletions(-) create mode 100644 plugins/heroku-alias/heroku-alias.plugin.zsh delete mode 100644 plugins/heroku-alias/heroku.alias.sh diff --git a/plugins/heroku-alias/README.md b/plugins/heroku-alias/README.md index 4b7b953fd..4ecb07a23 100644 --- a/plugins/heroku-alias/README.md +++ b/plugins/heroku-alias/README.md @@ -1,127 +1,140 @@ # heroku-alias -🧬 Full alias for heroku cli -|🚀 last maj|📡 source| -|---|---| -|02/06/2020|[heroku cli doc](https://devcenter.heroku.com/articles/heroku-cli-commands)| +Full alias list for Heroku CLI. -# Alias list +To use it, add `heroku-alias` to the plugins array in your zshrc file: -## general -| Alias | Command | -| ------------- | ------------- | -| h | heroku | -| hauto | heroku autocomplete $(echo $SHELL) | -| hl | heroku local | - -## config -| Alias | Command | -| ------------- | ------------- | -| hc | heroku config | -| hca | heroku config -a | -| hcr | heroku config -r | -| hcs | heroku config:set | -| hcu | heroku config:unset | -| hcfile | function hcfile bellow | - -```sh -hcfile() { - echo " Which platform [-r/a name] ? " - read platform - echo " Which file ? " - read file - while read line; - do heroku config:set "$platform" "$line"; - done < "$file" -} +```zsh +plugins=(... heroku-alias) ``` -## apps and favorites -| Alias | Command | -| ------------- | ------------- | -| ha | heroku apps | -| hpop | heroku create | -| hkill | heroku apps:destroy | -| hlog | heroku apps:errors | -| hfav | heroku apps:favorites | -| hfava | heroku apps:favorites:add | +## Requirements + +- [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli) + +| 🚀 last maj | 📡 source | +| ---------- | --------------------------------------------------------------------------- | +| 02/06/2020 | [heroku cli doc](https://devcenter.heroku.com/articles/heroku-cli-commands) | + +## Aliases + +### general + +| Alias | Command | +| ----- | ---------------------------------- | +| h | heroku | +| hauto | heroku autocomplete $(echo $SHELL) | +| hl | heroku local | + +### config + +| Alias | Command | +| ------ | ---------------------- | +| hc | heroku config | +| hca | heroku config -a | +| hcr | heroku config -r | +| hcs | heroku config:set | +| hcu | heroku config:unset | + +Also, you can use the `hcfile` function to set multiple config variables from a file, +which asks you for a platform and a config file to read the configuration from. + +### apps and favorites + +| Alias | Command | +| ----- | ---------------------------- | +| ha | heroku apps | +| hpop | heroku create | +| hkill | heroku apps:destroy | +| hlog | heroku apps:errors | +| hfav | heroku apps:favorites | +| hfava | heroku apps:favorites:add | | hfavr | heroku apps:favorites:remove | -| hai | heroku apps:info | -| hair | heroku apps:info -r | -| haia | heroku apps:info -a | - -# auth -| Alias | Command | -| ------------- | ------------- | -| h2fa | heroku auth:2fa | +| hai | heroku apps:info | +| hair | heroku apps:info -r | +| haia | heroku apps:info -a | + +## auth + +| Alias | Command | +| ----- | ----------------------- | +| h2fa | heroku auth:2fa | | h2far | heroku auth:2fa:disable | -# access -| Alias | Command | -| ------------- | ------------- | -| hac | heroku access | -| hacr | heroku access -r | -| haca | heroku access -a | -| hadd | heroku access:add | -| hdel | heroku access:remove | -| hup | heroku access:update | - -## addons -| Alias | Command | -| ------------- | ------------- | -| hads | heroku addons -A | -| hada | heroku addons -a | -| hadr | heroku addons -r | -| hadat | heroku addons:attach | -| hadc | heroku addons:create | +## access + +| Alias | Command | +| ----- | -------------------- | +| hac | heroku access | +| hacr | heroku access -r | +| haca | heroku access -a | +| hadd | heroku access:add | +| hdel | heroku access:remove | +| hup | heroku access:update | + +### addons + +| Alias | Command | +| ----- | --------------------- | +| hads | heroku addons -A | +| hada | heroku addons -a | +| hadr | heroku addons -r | +| hadat | heroku addons:attach | +| hadc | heroku addons:create | | hadel | heroku addons:destroy | -| hadde | heroku addons:detach | -| hadoc | heroku addons:docs | - -## login -| Alias | Command | -| ------------- | ------------- | -| hin | heroku login | -| hout | heroku logout | -| hi | heroku login -i | -| hwho | heroku auth:whoami | - -## authorizations -| Alias | Command | -| ------------- | ------------- | -| hth | heroku authorizations | +| hadde | heroku addons:detach | +| hadoc | heroku addons:docs | + +### login + +| Alias | Command | +| ----- | ------------------ | +| hin | heroku login | +| hout | heroku logout | +| hi | heroku login -i | +| hwho | heroku auth:whoami | + +### authorizations + +| Alias | Command | +| ------ | ---------------------------- | +| hth | heroku authorizations | | hthadd | heroku authorizations:create | -| hthif | heroku authorizations:info | +| hthif | heroku authorizations:info | | hthdel | heroku authorizations:revoke | | hthrot | heroku authorizations:rotate | -| hthup | heroku authorizations:update | - -## plugins -| Alias | Command | -| ------------- | ------------- | -| hp | heroku plugins | - -# log -| Alias | Command | -| ------------- | ------------- | -|hg | heroku logs| -| hgt | heroku log tail | - -# database -| Alias | Command | -| ------------- | ------------- | -| hpg | heroku pg | -| hpsql | heroku pg:psql | -| hpb | heroku pg:backups | -| hpbc | heroku pg:backups:capture | -| hpbd | heroku pg:backups:download | -| hpbr | heroku pg:backups:restore | - -# certs -| Alias | Command | -| ------------- | ------------- | -| hssl | heroku certs | -| hssli | heroku certs:info | -| hssla | heroku certs:add | +| hthup | heroku authorizations:update | + +### plugins + +| Alias | Command | +| ----- | -------------- | +| hp | heroku plugins | + +### log + +| Alias | Command | +| ----- | --------------- | +| hg | heroku logs | +| hgt | heroku log tail | + +### database + +| Alias | Command | +| ----- | -------------------------- | +| hpg | heroku pg | +| hpsql | heroku pg:psql | +| hpb | heroku pg:backups | +| hpbc | heroku pg:backups:capture | +| hpbd | heroku pg:backups:download | +| hpbr | heroku pg:backups:restore | + +### certs + +| Alias | Command | +| ----- | ------------------- | +| hssl | heroku certs | +| hssli | heroku certs:info | +| hssla | heroku certs:add | | hsslu | heroku certs:update | | hsslr | heroku certs:remove | diff --git a/plugins/heroku-alias/heroku-alias.plugin.zsh b/plugins/heroku-alias/heroku-alias.plugin.zsh new file mode 100644 index 000000000..7daf715b5 --- /dev/null +++ b/plugins/heroku-alias/heroku-alias.plugin.zsh @@ -0,0 +1,92 @@ +# general +alias h='heroku' +alias hauto='heroku autocomplete $(echo $SHELL)' +alias hl='heroku local' + +# log +alias hg='heroku logs' +alias hgt='heroku log tail' + +# database +alias hpg='heroku pg' +alias hpsql='heroku pg:psql' +alias hpb='heroku pg:backups' +alias hpbc='heroku pg:backups:capture' +alias hpbd='heroku pg:backups:download' +alias hpbr='heroku pg:backups:restore' + +# config +alias hc='heroku config' +alias hca='heroku config -a' +alias hcr='heroku config -r' +alias hcs='heroku config:set' +alias hcu='heroku config:unset' + +# this function allow to load multi env set in a file +hcfile() { + echo 'Which platform [-r/a name] ?' + read platform + echo 'Which file ?' + read file + while read line; + do heroku config:set "$platform" "$line"; + done < "$file" +} + +# apps and favorites +alias ha='heroku apps' +alias hpop='heroku create' +alias hkill='heroku apps:destroy' +alias hlog='heroku apps:errors' +alias hfav='heroku apps:favorites' +alias hfava='heroku apps:favorites:add' +alias hfavr='heroku apps:favorites:remove' +alias hai='heroku apps:info' +alias hair='heroku apps:info -r' +alias haia='heroku apps:info -a' + +# auth +alias h2fa='heroku auth:2fa' +alias h2far='heroku auth:2fa:disable' + +# access +alias hac='heroku access' +alias hacr='heroku access -r' +alias haca='heroku access -a' +alias hadd='heroku access:add' +alias hdel='heroku access:remove' +alias hup='heroku access:update' + +# addons +alias hads='heroku addons -A' +alias hada='heroku addons -a' +alias hadr='heroku addons -r' +alias hadat='heroku addons:attach' +alias hadc='heroku addons:create' +alias hadel='heroku addons:destroy' +alias hadde='heroku addons:detach' +alias hadoc='heroku addons:docs' + +# login +alias hin='heroku login' +alias hout='heroku logout' +alias hi='heroku login -i' +alias hwho='heroku auth:whoami' + +# authorizations +alias hth='heroku authorizations' +alias hthadd='heroku authorizations:create' +alias hthif='heroku authorizations:info' +alias hthdel='heroku authorizations:revoke' +alias hthrot='heroku authorizations:rotate' +alias hthup='heroku authorizations:update' + +# plugins +alias hp='heroku plugins' + +# cert +alias hssl='heroku certs' +alias hssli='heroku certs:info' +alias hssla='heroku certs:add' +alias hsslu='heroku certs:update' +alias hsslr='heroku certs:remove' diff --git a/plugins/heroku-alias/heroku.alias.sh b/plugins/heroku-alias/heroku.alias.sh deleted file mode 100644 index 7daf715b5..000000000 --- a/plugins/heroku-alias/heroku.alias.sh +++ /dev/null @@ -1,92 +0,0 @@ -# general -alias h='heroku' -alias hauto='heroku autocomplete $(echo $SHELL)' -alias hl='heroku local' - -# log -alias hg='heroku logs' -alias hgt='heroku log tail' - -# database -alias hpg='heroku pg' -alias hpsql='heroku pg:psql' -alias hpb='heroku pg:backups' -alias hpbc='heroku pg:backups:capture' -alias hpbd='heroku pg:backups:download' -alias hpbr='heroku pg:backups:restore' - -# config -alias hc='heroku config' -alias hca='heroku config -a' -alias hcr='heroku config -r' -alias hcs='heroku config:set' -alias hcu='heroku config:unset' - -# this function allow to load multi env set in a file -hcfile() { - echo 'Which platform [-r/a name] ?' - read platform - echo 'Which file ?' - read file - while read line; - do heroku config:set "$platform" "$line"; - done < "$file" -} - -# apps and favorites -alias ha='heroku apps' -alias hpop='heroku create' -alias hkill='heroku apps:destroy' -alias hlog='heroku apps:errors' -alias hfav='heroku apps:favorites' -alias hfava='heroku apps:favorites:add' -alias hfavr='heroku apps:favorites:remove' -alias hai='heroku apps:info' -alias hair='heroku apps:info -r' -alias haia='heroku apps:info -a' - -# auth -alias h2fa='heroku auth:2fa' -alias h2far='heroku auth:2fa:disable' - -# access -alias hac='heroku access' -alias hacr='heroku access -r' -alias haca='heroku access -a' -alias hadd='heroku access:add' -alias hdel='heroku access:remove' -alias hup='heroku access:update' - -# addons -alias hads='heroku addons -A' -alias hada='heroku addons -a' -alias hadr='heroku addons -r' -alias hadat='heroku addons:attach' -alias hadc='heroku addons:create' -alias hadel='heroku addons:destroy' -alias hadde='heroku addons:detach' -alias hadoc='heroku addons:docs' - -# login -alias hin='heroku login' -alias hout='heroku logout' -alias hi='heroku login -i' -alias hwho='heroku auth:whoami' - -# authorizations -alias hth='heroku authorizations' -alias hthadd='heroku authorizations:create' -alias hthif='heroku authorizations:info' -alias hthdel='heroku authorizations:revoke' -alias hthrot='heroku authorizations:rotate' -alias hthup='heroku authorizations:update' - -# plugins -alias hp='heroku plugins' - -# cert -alias hssl='heroku certs' -alias hssli='heroku certs:info' -alias hssla='heroku certs:add' -alias hsslu='heroku certs:update' -alias hsslr='heroku certs:remove' -- cgit v1.2.3-70-g09d2