3 _powify_all_servers() {
4 all_servers=(`ls $HOME/.pow/ 2>/dev/null`)
9 local -a _1st_arguments
11 'server:server specific commands'
13 'create:creates a pow app from the current directory (to change the name append name as an argument)'
14 'destroy:destroys the pow app linked to the current directory'
15 'restart:restarts the pow app linked to the current directory'
16 'always_restart:reload the pow app after each request'
17 'always_restart_off:do not reload the pow app after each request'
18 'rename:rename the current pow app to [NAME] or rename [OLD] to [NEW]'
19 'environment:run the this pow app in a different environment (aliased `env`)'
20 'browse:opens and navigates the default browser to this app'
21 'logs:tail the application logs'
24 _arguments '*:: :->command'
26 if (( CURRENT == 1 )); then
27 _describe -t commands "powify command" _1st_arguments
34 'install[install pow server]' \
35 'reinstall[reinstall pow server]' \
36 'update[update pow server]' \
37 'uninstall[uninstall pow server]' \
38 'list[list all pow apps]' \
39 'start[start the pow server]' \
40 'stop[stop the pow server]' \
41 'restart[restart the pow server]' \
42 'host[adds all pow apps to /etc/hosts file]' \
43 'unhost[removes all pow apps from /etc/hosts file]' \
44 'status[print the current server status]' \
45 'config[print the current server configuration]' \
46 'logs[tails the pow server logs]' ;;
49 'install[install powify.dev server management tool]' \
50 'reinstall[reinstall powify.dev server management tool]' \
51 'uninstall[uninstall powify.dev server management tool]' ;;
52 destroy|restart|always_restart|always_restart_off|rename|browse|logs)
54 _wanted all_servers expl 'all pow servers' compadd -a all_servers ;;