From c3493dc5ceb87a5c74d288f30fbe4bdbf4cb97c5 Mon Sep 17 00:00:00 2001 From: rco-ableton Date: Wed, 16 May 2018 17:40:42 +0200 Subject: Add Heroku pipelines support (#5660) --- plugins/heroku/_heroku | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'plugins/heroku') diff --git a/plugins/heroku/_heroku b/plugins/heroku/_heroku index 878d3ce1b..f26595e00 100644 --- a/plugins/heroku/_heroku +++ b/plugins/heroku/_heroku @@ -45,6 +45,18 @@ _1st_arguments=( "logs\:drains":"manage syslog drains" "maintenance\:on":"put the app into maintenance mode" "maintenance\:off":"take the app out of maintenance mode" + "pipelines":"list pipelines you have access to" + "pipelines\:add":"add this app to a pipeline" + "pipelines\:create":"create a new pipeline" + "pipelines\:destroy":"destroy a pipeline" + "pipelines\:diff":"compares the latest release of this app to its downstream app(s)" + "pipelines\:info":"show list of apps in a pipeline" + "pipelines\:list":"list pipelines you have access to" + "pipelines\:open":"open a pipeline in dashboard" + "pipelines\:promote":"promote the latest release of this app to its downstream app(s)" + "pipelines\:remove":"remove this app from its pipeline" + "pipelines\:rename":"rename a pipeline" + "pipelines\:update":"update this app's stage in a pipeline" "pg\:credentials":"display the DATABASE credentials" "pg\:diagnose":"run diagnostics report on DATABASE" "pg\:info":"display database information" @@ -131,6 +143,41 @@ case "$words[1]" in '(-t|--tail)'{-t,--tail}'[continually stream logs]' \ ) ;; + pipelines) + _command_args=( + '(--json)'--json'[output in json format]' \ + ) + ;; + pipelines:add) + _command_args=( + '(-s|--stage)'{-s,--stage}'[stage of first app in pipeline]' \ + ) + ;; + pipelines:create) + _command_args=( + '(-s|--stage)'{-s,--stage}'[stage of first app in pipeline]' \ + ) + ;; + pipelines:info) + _command_args=( + '(--json)'--json'[output in json format]' \ + ) + ;; + pipelines:list) + _command_args=( + '(--json)'--json'[output in json format]' \ + ) + ;; + pipelines:promote) + _command_args=( + '(-t|--to)'{-t,--to}'[comma separated list of apps to promote to]' \ + ) + ;; + pipelines:update) + _command_args=( + '(-s|--stage)'{-s,--stage}'[stage of first app in pipeline]' \ + ) + ;; pgbackups:capture) _command_args=( '(-e|--expire)'{-e,--expire}'[if no slots are available to capture, delete the oldest backup to make room]' \ -- cgit v1.2.3-70-g09d2 From de1e3c0794ab4214412fe4f15d1e39ddffcbea42 Mon Sep 17 00:00:00 2001 From: Julien Palmas Date: Mon, 22 Jun 2015 14:19:08 +0200 Subject: add pg:backups command --- plugins/heroku/_heroku | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins/heroku') diff --git a/plugins/heroku/_heroku b/plugins/heroku/_heroku index f26595e00..4122de237 100644 --- a/plugins/heroku/_heroku +++ b/plugins/heroku/_heroku @@ -72,6 +72,7 @@ _1st_arguments=( "pg\:unfollow":"stop a replica from following and make it a read/write database" "pg\:upgrade":"unfollow a database and upgrade it to the latest PostgreSQL version" "pg\:wait":"monitor database creation, exit when complete" + "pg\:backups":"Interact with built-in backups" "pgbackups":"list captured backups" "pgbackups\:url":"get a temporary URL for a backup" "pgbackups\:capture":"capture a backup from a database id" -- cgit v1.2.3-70-g09d2 From 0cc371181a0727e7de261cd78b3fe6cc11d6a8a2 Mon Sep 17 00:00:00 2001 From: Jeff Dickey <216188+jdxcode@users.noreply.github.com> Date: Tue, 7 Aug 2018 12:41:53 -0700 Subject: use official heroku autocomplete (#6919) --- plugins/heroku/_heroku | 199 --------------------------------------- plugins/heroku/heroku.plugin.zsh | 9 ++ 2 files changed, 9 insertions(+), 199 deletions(-) delete mode 100644 plugins/heroku/_heroku create mode 100644 plugins/heroku/heroku.plugin.zsh (limited to 'plugins/heroku') diff --git a/plugins/heroku/_heroku b/plugins/heroku/_heroku deleted file mode 100644 index 4122de237..000000000 --- a/plugins/heroku/_heroku +++ /dev/null @@ -1,199 +0,0 @@ -#compdef heroku - -# Heroku Autocomplete plugin for Oh-My-Zsh -# Requires: The Heroku client gem (https://github.com/heroku/heroku) -# Author: Ali B. (http://awhitebox.com) - -local -a _1st_arguments -_1st_arguments=( - "account\:confirm_billing":"Confirm that your account can be billed at the end of the month" - "addons":"list installed addons" - "addons\:list":"list all available addons" - "addons\:add":"install an addon" - "addons\:upgrade":"upgrade an existing addon" - "addons\:downgrade":"downgrade an existing addon" - "addons\:remove":"uninstall an addon" - "addons\:open":"open an addon's dashboard in your browser" - "apps":"list your apps" - "apps\:info":"show detailed app information" - "apps\:create":"create a new app" - "apps\:rename":"rename the app" - "apps\:open":"open the app in a web browser" - "apps\:destroy":"permanently destroy an app" - "auth\:login":"log in with your heroku credentials" - "auth\:logout":"clear local authentication credentials" - "config":"display the config vars for an app" - "config\:pull":"pull heroku config vars down to the local environment" - "config\:push":"push local config vars to heroku" - "config\:set":"set one or more config vars" - "config\:unset":"unset one or more config vars" - "domains":"list custom domains for an app" - "domains\:add":"add a custom domain to an app" - "domains\:remove":"remove a custom domain from an app" - "domains\:clear":"remove all custom domains from an app" - "features":"list available app features" - "features\:disable":"disables a feature" - "features\:enable":"enables an feature" - "features\:info":"displays additional information about feature" - "help":"list available commands or display help for a specific command" - "keys":"display keys for the current user" - "keys\:add":"add a key for the current user" - "keys\:remove":"remove a key from the current user" - "keys\:clear":"remove all authentication keys from the current user" - "logs":"display recent log output" - "logs\:cron":"DEPRECATED: display cron logs from legacy logging" - "logs\:drains":"manage syslog drains" - "maintenance\:on":"put the app into maintenance mode" - "maintenance\:off":"take the app out of maintenance mode" - "pipelines":"list pipelines you have access to" - "pipelines\:add":"add this app to a pipeline" - "pipelines\:create":"create a new pipeline" - "pipelines\:destroy":"destroy a pipeline" - "pipelines\:diff":"compares the latest release of this app to its downstream app(s)" - "pipelines\:info":"show list of apps in a pipeline" - "pipelines\:list":"list pipelines you have access to" - "pipelines\:open":"open a pipeline in dashboard" - "pipelines\:promote":"promote the latest release of this app to its downstream app(s)" - "pipelines\:remove":"remove this app from its pipeline" - "pipelines\:rename":"rename a pipeline" - "pipelines\:update":"update this app's stage in a pipeline" - "pg\:credentials":"display the DATABASE credentials" - "pg\:diagnose":"run diagnostics report on DATABASE" - "pg\:info":"display database information" - "pg\:kill":"kill a query" - "pg\:killall":"terminates ALL connections" - "pg\:maintenance":"manage maintenance for DATABASE" - "pg\:promote":"sets DATABASE as your DATABASE_URL" - "pg\:ps":"view active queries with execution time" - "pg\:psql":"open a psql shell to the database" - "pg\:pull":"pull from REMOTE_SOURCE_DATABASE to LOCAL_TARGET_DATABASE" - "pg\:push":"push from LOCAL_SOURCE_DATABASE to REMOTE_TARGET_DATABASE" - "pg\:reset":"delete all data in DATABASE" - "pg\:unfollow":"stop a replica from following and make it a read/write database" - "pg\:upgrade":"unfollow a database and upgrade it to the latest PostgreSQL version" - "pg\:wait":"monitor database creation, exit when complete" - "pg\:backups":"Interact with built-in backups" - "pgbackups":"list captured backups" - "pgbackups\:url":"get a temporary URL for a backup" - "pgbackups\:capture":"capture a backup from a database id" - "pgbackups\:restore":"restore a backup to a database" - "pgbackups\:destroy":"destroys a backup" - "plugins":"list installed plugins" - "plugins\:install":"install a plugin" - "plugins\:uninstall":"uninstall a plugin" - "ps\:dynos":"scale to QTY web processes" - "ps\:workers":"scale to QTY background processes" - "ps":"list processes for an app" - "ps\:restart":"restart an app process" - "ps\:scale":"scale processes by the given amount" - "releases":"list releases" - "releases\:info":"view detailed information for a release" - "rollback":"roll back to an older release" - "run":"run an attached process" - "run\:rake":"remotely execute a rake command" - "run\:console":"open a remote console session" - "sharing":"list collaborators on an app" - "sharing\:add":"add a collaborator to an app" - "sharing\:remove":"remove a collaborator from an app" - "sharing\:transfer":"transfer an app to a new owner" - "ssl":"list certificates for an app" - "ssl\:add":"add an ssl certificate to an app" - "ssl\:remove":"remove an ssl certificate from an app" - "ssl\:clear":"remove all ssl certificates from an app" - "stack":"show the list of available stacks" - "stack\:migrate":"prepare migration of this app to a new stack" - "version":"show heroku client version" -) - -_arguments '*:: :->command' - -if (( CURRENT == 1 )); then - _describe -t commands "heroku command" _1st_arguments - return -fi - -local -a _command_args -case "$words[1]" in - apps:info) - _command_args=( - '(-r|--raw)'{-r,--raw}'[output info as raw key/value pairs]' \ - ) - ;; - apps:create) - _command_args=( - '(-a|--addons)'{-a,--addons}'[a list of addons to install]' \ - '(-r|--remote)'{-r,--remote}'[the git remote to create, default "heroku"]' \ - '(-s|--stack)'{-s,--stack}'[the stack on which to create the app]' \ - ) - ;; - config) - _command_args=( - '(-s|--shell)'{-s,--shell}'[output config vars in shell format]' \ - ) - ;; - keys) - _command_args=( - '(-l|--long)'{-l,--long}'[display extended information for each key]' \ - ) - ;; - logs) - _command_args=( - '(-n|--num)'{-n,--num}'[the number of lines to display]' \ - '(-p|--ps)'{-p,--ps}'[only display logs from the given process]' \ - '(-s|--source)'{-s,--source}'[only display logs from the given source]' \ - '(-t|--tail)'{-t,--tail}'[continually stream logs]' \ - ) - ;; - pipelines) - _command_args=( - '(--json)'--json'[output in json format]' \ - ) - ;; - pipelines:add) - _command_args=( - '(-s|--stage)'{-s,--stage}'[stage of first app in pipeline]' \ - ) - ;; - pipelines:create) - _command_args=( - '(-s|--stage)'{-s,--stage}'[stage of first app in pipeline]' \ - ) - ;; - pipelines:info) - _command_args=( - '(--json)'--json'[output in json format]' \ - ) - ;; - pipelines:list) - _command_args=( - '(--json)'--json'[output in json format]' \ - ) - ;; - pipelines:promote) - _command_args=( - '(-t|--to)'{-t,--to}'[comma separated list of apps to promote to]' \ - ) - ;; - pipelines:update) - _command_args=( - '(-s|--stage)'{-s,--stage}'[stage of first app in pipeline]' \ - ) - ;; - pgbackups:capture) - _command_args=( - '(-e|--expire)'{-e,--expire}'[if no slots are available to capture, delete the oldest backup to make room]' \ - ) - ;; - stack) - _command_args=( - '(-a|--all)'{-a,--all}'[include deprecated stacks]' \ - ) - ;; - esac - -_arguments \ - $_command_args \ - '(--app)--app[the app name]' \ - '(--remote)--remote[the remote name]' \ - '(--help)--help[help about the current command]' \ - && return 0 diff --git a/plugins/heroku/heroku.plugin.zsh b/plugins/heroku/heroku.plugin.zsh new file mode 100644 index 000000000..9a99b4211 --- /dev/null +++ b/plugins/heroku/heroku.plugin.zsh @@ -0,0 +1,9 @@ +HEROKU_AC_CACHE_DIR="$HOME/.cache" +if [ "$(uname -s)" = "Darwin" ]; then + HEROKU_AC_CACHE_DIR="$HOME/Library/Caches" +fi +if [ ! -z "$XDG_CACHE_HOME" ]; then + HEROKU_AC_CACHE_DIR="$XDG_CACHE_DIR" +fi +HEROKU_AC_ZSH_SETUP_PATH=$HEROKU_AC_CACHE_DIR/heroku/autocomplete/zsh_setup +[ -f $HEROKU_AC_ZSH_SETUP_PATH ] && source $HEROKU_AC_ZSH_SETUP_PATH -- cgit v1.2.3-70-g09d2 From 4c8dd9c26da5b6cb85c5b82dab5b31b9d216834e Mon Sep 17 00:00:00 2001 From: Erwan ROUSSEL Date: Fri, 26 Oct 2018 14:52:54 +0200 Subject: heroku: add README (#7342) --- plugins/heroku/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 plugins/heroku/README.md (limited to 'plugins/heroku') diff --git a/plugins/heroku/README.md b/plugins/heroku/README.md new file mode 100644 index 000000000..2bf92c9de --- /dev/null +++ b/plugins/heroku/README.md @@ -0,0 +1,9 @@ +# Heroku + +This plugin provides completion for the [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli). + +To use it add heroku to the plugins array in your zshrc file: + +```bash +plugins=(... heroku) +``` -- cgit v1.2.3-70-g09d2