1
|
1
|
new file mode 100644
|
...
|
...
|
@@ -0,0 +1,158 @@
|
|
0
|
+#compdef heroku
|
|
1
|
+
|
|
2
|
+# Heroku Autocomplete plugin for Oh-My-Zsh
|
|
3
|
+# Requires: The Heroku client gem (https://github.com/heroku/heroku)
|
|
4
|
+# Author: Ali B. (http://awhitebox.com)
|
|
5
|
+
|
|
6
|
+local -a _1st_arguments
|
|
7
|
+_1st_arguments=(
|
|
8
|
+ "account\:confirm_billing":"Confirm that your account can be billed at the end of the month"
|
|
9
|
+ "addons":"list installed addons"
|
|
10
|
+ "addons\:list":"list all available addons"
|
|
11
|
+ "addons\:add":"install an addon"
|
|
12
|
+ "addons\:upgrade":"upgrade an existing addon"
|
|
13
|
+ "addons\:downgrade":"downgrade an existing addon"
|
|
14
|
+ "addons\:remove":"uninstall an addon"
|
|
15
|
+ "addons\:open":"open an addon's dashboard in your browser"
|
|
16
|
+ "apps":"list your apps"
|
|
17
|
+ "apps\:info":"show detailed app information"
|
|
18
|
+ "apps\:create":"create a new app"
|
|
19
|
+ "apps\:rename":"rename the app"
|
|
20
|
+ "apps\:open":"open the app in a web browser"
|
|
21
|
+ "apps\:destroy":"permanently destroy an app"
|
|
22
|
+ "auth\:login":"log in with your heroku credentials"
|
|
23
|
+ "auth\:logout":"clear local authentication credentials"
|
|
24
|
+ "config":"display the config vars for an app"
|
|
25
|
+ "config\:add":"add one or more config vars"
|
|
26
|
+ "config\:remove":"remove a config var"
|
|
27
|
+ "db\:push":"push local data up to your app"
|
|
28
|
+ "db\:pull":"pull heroku data down into your local database"
|
|
29
|
+ "domains":"list custom domains for an app"
|
|
30
|
+ "domains\:add":"add a custom domain to an app"
|
|
31
|
+ "domains\:remove":"remove a custom domain from an app"
|
|
32
|
+ "domains\:clear":"remove all custom domains from an app"
|
|
33
|
+ "help":"list available commands or display help for a specific command"
|
|
34
|
+ "keys":"display keys for the current user"
|
|
35
|
+ "keys\:add":"add a key for the current user"
|
|
36
|
+ "keys\:remove":"remove a key from the current user"
|
|
37
|
+ "keys\:clear":"remove all authentication keys from the current user"
|
|
38
|
+ "logs":"display recent log output"
|
|
39
|
+ "logs\:cron":"DEPRECATED: display cron logs from legacy logging"
|
|
40
|
+ "logs\:drains":"manage syslog drains"
|
|
41
|
+ "maintenance\:on":"put the app into maintenance mode"
|
|
42
|
+ "maintenance\:off":"take the app out of maintenance mode"
|
|
43
|
+ "pg\:info":"display database information"
|
|
44
|
+ "pg\:ingress":"allow direct connections to the database from this IP for one minute"
|
|
45
|
+ "pg\:promote":"sets DATABASE as your DATABASE_URL"
|
|
46
|
+ "pg\:psql":"open a psql shell to the database"
|
|
47
|
+ "pg\:reset":"delete all data in DATABASE"
|
|
48
|
+ "pg\:unfollow":"stop a replica from following and make it a read/write database"
|
|
49
|
+ "pg\:wait":"monitor database creation, exit when complete"
|
|
50
|
+ "pgbackups":"list captured backups"
|
|
51
|
+ "pgbackups\:url":"get a temporary URL for a backup"
|
|
52
|
+ "pgbackups\:capture":"capture a backup from a database id"
|
|
53
|
+ "pgbackups\:restore":"restore a backup to a database"
|
|
54
|
+ "pgbackups\:destroy":"destroys a backup"
|
|
55
|
+ "plugins":"list installed plugins"
|
|
56
|
+ "plugins\:install":"install a plugin"
|
|
57
|
+ "plugins\:uninstall":"uninstall a plugin"
|
|
58
|
+ "ps\:dynos":"scale to QTY web processes"
|
|
59
|
+ "ps\:workers":"scale to QTY background processes"
|
|
60
|
+ "ps":"list processes for an app"
|
|
61
|
+ "ps\:restart":"restart an app process"
|
|
62
|
+ "ps\:scale":"scale processes by the given amount"
|
|
63
|
+ "releases":"list releases"
|
|
64
|
+ "releases\:info":"view detailed information for a release"
|
|
65
|
+ "rollback":"roll back to an older release"
|
|
66
|
+ "run":"run an attached process"
|
|
67
|
+ "run\:rake":"remotely execute a rake command"
|
|
68
|
+ "run\:console":"open a remote console session"
|
|
69
|
+ "sharing":"list collaborators on an app"
|
|
70
|
+ "sharing\:add":"add a collaborator to an app"
|
|
71
|
+ "sharing\:remove":"remove a collaborator from an app"
|
|
72
|
+ "sharing\:transfer":"transfer an app to a new owner"
|
|
73
|
+ "ssl":"list certificates for an app"
|
|
74
|
+ "ssl\:add":"add an ssl certificate to an app"
|
|
75
|
+ "ssl\:remove":"remove an ssl certificate from an app"
|
|
76
|
+ "ssl\:clear":"remove all ssl certificates from an app"
|
|
77
|
+ "stack":"show the list of available stacks"
|
|
78
|
+ "stack\:migrate":"prepare migration of this app to a new stack"
|
|
79
|
+ "version":"show heroku client version"
|
|
80
|
+)
|
|
81
|
+
|
|
82
|
+_arguments '*:: :->command'
|
|
83
|
+
|
|
84
|
+if (( CURRENT == 1 )); then
|
|
85
|
+ _describe -t commands "heroku command" _1st_arguments
|
|
86
|
+ return
|
|
87
|
+fi
|
|
88
|
+
|
|
89
|
+local -a _command_args
|
|
90
|
+case "$words[1]" in
|
|
91
|
+ apps:info)
|
|
92
|
+ _command_args=(
|
|
93
|
+ '(-r|--raw)'{-r,--raw}'[output info as raw key/value pairs]' \
|
|
94
|
+ )
|
|
95
|
+ ;;
|
|
96
|
+ apps:create)
|
|
97
|
+ _command_args=(
|
|
98
|
+ '(-a|--addons)'{-a,--addons}'[a list of addons to install]' \
|
|
99
|
+ '(-r|--remote)'{-r,--remote}'[the git remote to create, default "heroku"]' \
|
|
100
|
+ '(-s|--stack)'{-s,--stack}'[the stack on which to create the app]' \
|
|
101
|
+ )
|
|
102
|
+ ;;
|
|
103
|
+ config)
|
|
104
|
+ _command_args=(
|
|
105
|
+ '(-s|--shell)'{-s,--shell}'[output config vars in shell format]' \
|
|
106
|
+ )
|
|
107
|
+ ;;
|
|
108
|
+ db:push)
|
|
109
|
+ _command_args=(
|
|
110
|
+ '(-c|--chunksize)'{-c,--chunksize}'[specify the number of rows to send in each batch]' \
|
|
111
|
+ '(-d|--debug)'{-d,--debug}'[enable debugging output]' \
|
|
112
|
+ '(-e|--exclude)'{-e,--exclude}'[exclude the specified tables from the push]' \
|
|
113
|
+ '(-f|--filter)'{-f,--filter}'[only push certain tables]' \
|
|
114
|
+ '(-r|--resume)'{-r,--resume}'[resume transfer described by a .dat file]' \
|
|
115
|
+ '(-t|--tables)'{-t,--tables}'[only push the specified tables]' \
|
|
116
|
+ )
|
|
117
|
+ ;;
|
|
118
|
+ db:pull)
|
|
119
|
+ _command_args=(
|
|
120
|
+ '(-c|--chunksize)'{-c,--chunksize}'[specify the number of rows to send in each batch]' \
|
|
121
|
+ '(-d|--debug)'{-d,--debug}'[enable debugging output]' \
|
|
122
|
+ '(-e|--exclude)'{-e,--exclude}'[exclude the specified tables from the pull]' \
|
|
123
|
+ '(-f|--filter)'{-f,--filter}'[only pull certain tables]' \
|
|
124
|
+ '(-r|--resume)'{-r,--resume}'[resume transfer described by a .dat file]' \
|
|
125
|
+ '(-t|--tables)'{-t,--tables}'[only pull the specified tables]' \
|
|
126
|
+ )
|
|
127
|
+ ;;
|
|
128
|
+ keys)
|
|
129
|
+ _command_args=(
|
|
130
|
+ '(-l|--long)'{-l,--long}'[display extended information for each key]' \
|
|
131
|
+ )
|
|
132
|
+ ;;
|
|
133
|
+ logs)
|
|
134
|
+ _command_args=(
|
|
135
|
+ '(-n|--num)'{-n,--num}'[the number of lines to display]' \
|
|
136
|
+ '(-p|--ps)'{-p,--ps}'[only display logs from the given process]' \
|
|
137
|
+ '(-s|--source)'{-s,--source}'[only display logs from the given source]' \
|
|
138
|
+ '(-t|--tail)'{-t,--tail}'[continually stream logs]' \
|
|
139
|
+ )
|
|
140
|
+ ;;
|
|
141
|
+ pgbackups:capture)
|
|
142
|
+ _command_args=(
|
|
143
|
+ '(-e|--expire)'{-e,--expire}'[if no slots are available to capture, delete the oldest backup to make room]' \
|
|
144
|
+ )
|
|
145
|
+ ;;
|
|
146
|
+ stack)
|
|
147
|
+ _command_args=(
|
|
148
|
+ '(-a|--all)'{-a,--all}'[include deprecated stacks]' \
|
|
149
|
+ )
|
|
150
|
+ ;;
|
|
151
|
+ esac
|
|
152
|
+
|
|
153
|
+_arguments \
|
|
154
|
+ $_command_args \
|
|
155
|
+ '(--app)--app[the app name]' \
|
|
156
|
+ && return 0
|
|
157
|
+
|