|
7 | 7 | "strings" |
8 | 8 | "syscall" |
9 | 9 |
|
| 10 | + "github.com/deis/workflow-cli/cli" |
10 | 11 | "github.com/deis/workflow-cli/parser" |
11 | 12 | docopt "github.com/docopt/docopt-go" |
12 | 13 | ) |
@@ -116,6 +117,8 @@ Use 'git push deis master' to deploy to an application. |
116 | 117 | err = parser.Registry(argv) |
117 | 118 | case "releases": |
118 | 119 | err = parser.Releases(argv) |
| 120 | + case "shortcuts": |
| 121 | + err = parser.Shortcuts(argv) |
119 | 122 | case "tags": |
120 | 123 | err = parser.Tags(argv) |
121 | 124 | case "users": |
@@ -192,28 +195,7 @@ func parseArgs(argv []string) (string, []string) { |
192 | 195 | } |
193 | 196 |
|
194 | 197 | func replaceShortcut(command string) string { |
195 | | - shortcuts := map[string]string{ |
196 | | - "create": "apps:create", |
197 | | - "destroy": "apps:destroy", |
198 | | - "info": "apps:info", |
199 | | - "login": "auth:login", |
200 | | - "logout": "auth:logout", |
201 | | - "logs": "apps:logs", |
202 | | - "open": "apps:open", |
203 | | - "passwd": "auth:passwd", |
204 | | - "pull": "builds:create", |
205 | | - "register": "auth:register", |
206 | | - "rollback": "releases:rollback", |
207 | | - "run": "apps:run", |
208 | | - "scale": "ps:scale", |
209 | | - "sharing": "perms:list", |
210 | | - "sharing:list": "perms:list", |
211 | | - "sharing:add": "perms:create", |
212 | | - "sharing:remove": "perms:delete", |
213 | | - "whoami": "auth:whoami", |
214 | | - } |
215 | | - |
216 | | - expandedCommand := shortcuts[command] |
| 198 | + expandedCommand := cli.Shortcuts[command] |
217 | 199 | if expandedCommand == "" { |
218 | 200 | return command |
219 | 201 | } |
|
0 commit comments