mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
Merge pull request #1292 from progrium/mh-columnar-help-output
use column to format help output
This commit is contained in:
@@ -32,8 +32,8 @@ case "$1" in
|
||||
|
||||
help)
|
||||
cat && cat<<EOF
|
||||
hello <app> Says "Hello <app>"
|
||||
hello:world Says "Hello world"
|
||||
hello <app>, Says "Hello <app>"
|
||||
hello:world, Says "Hello world"
|
||||
EOF
|
||||
;;
|
||||
|
||||
@@ -48,7 +48,7 @@ A few notes:
|
||||
|
||||
- You should always support `DOKKU_TRACE` as specified on the 2nd line of the plugin.
|
||||
- If your command requires that an application exists, ensure you check for it's existence in the manner prescribed above.
|
||||
- A `help` command is required, though it is allowed to be empty.
|
||||
- A `help` command is required, though it is allowed to be empty. Also, the command syntax will need to separated by `, ` in order to maintain columnar output alignment.
|
||||
- Commands *should* be namespaced.
|
||||
- As of 0.3.3, a catch-all should be implemented which exits with a `DOKKU_NOT_IMPLEMENTED_EXIT` code. This allows dokku to output a `command not found` message.
|
||||
- Be sure you want the "set -eo pipefail" option. Look at the following example :
|
||||
|
||||
@@ -107,8 +107,8 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
case "$1" in
|
||||
help | derp:help)
|
||||
cat && cat<<EOF
|
||||
derp:herp Herps the derp
|
||||
derp:serp [file] Shows the file's serp
|
||||
derp:herp, Herps the derp
|
||||
derp:serp [file], Shows the file's serp
|
||||
EOF
|
||||
;;
|
||||
|
||||
|
||||
10
dokku
10
dokku
@@ -224,11 +224,11 @@ case "$1" in
|
||||
echo ""
|
||||
echo "Options:"
|
||||
|
||||
cat<<EOF | pluginhook commands help | sort
|
||||
help Print the list of commands
|
||||
plugins Print active plugins
|
||||
plugins-install Install active plugins
|
||||
plugins-update Update active plugins
|
||||
cat<<EOF | pluginhook commands help | sort | column -c2 -t -s,
|
||||
help, Print the list of commands
|
||||
plugins, Print active plugins
|
||||
plugins-install, Install active plugins
|
||||
plugins-update, Update active plugins
|
||||
EOF
|
||||
;;
|
||||
|
||||
|
||||
@@ -218,12 +218,12 @@ case "$1" in
|
||||
|
||||
help)
|
||||
cat && cat<<EOF
|
||||
ls Pretty listing of deployed applications and containers
|
||||
logs <app> [-t] Show the last logs for an application (-t follows)
|
||||
run <app> <cmd> Run a command in the environment of an application
|
||||
url <app> Show the first URL for an application (compatibility)
|
||||
urls <app> Show all URLs for an application
|
||||
version Print dokku's version
|
||||
ls, Pretty listing of deployed applications and containers
|
||||
logs <app> [-t], Show the last logs for an application (-t follows)
|
||||
run <app> <cmd>, Run a command in the environment of an application
|
||||
url <app>, Show the first URL for an application (compatibility)
|
||||
urls <app>, Show all URLs for an application
|
||||
version, Print dokku's version
|
||||
EOF
|
||||
;;
|
||||
|
||||
|
||||
@@ -40,10 +40,10 @@ case "$1" in
|
||||
|
||||
help | events:help)
|
||||
cat && cat<<EOF
|
||||
events [-t] Show the last events (-t follows)
|
||||
events:list List logged events
|
||||
events:on Enable events logger
|
||||
events:off Disable events logger
|
||||
events [-t], Show the last events (-t follows)
|
||||
events:list, List logged events
|
||||
events:on, Enable events logger
|
||||
events:off, Disable events logger
|
||||
EOF
|
||||
;;
|
||||
|
||||
|
||||
@@ -55,9 +55,9 @@ case "$1" in
|
||||
|
||||
help | apps:help)
|
||||
cat && cat<<EOF
|
||||
apps List your apps
|
||||
apps:create <app> Create a new app
|
||||
apps:destroy <app> Permanently destroy an app
|
||||
apps, List your apps
|
||||
apps:create <app>, Create a new app
|
||||
apps:destroy <app>, Permanently destroy an app
|
||||
EOF
|
||||
;;
|
||||
|
||||
|
||||
@@ -87,8 +87,8 @@ case "$1" in
|
||||
|
||||
help | backup:help)
|
||||
cat && cat<<EOF
|
||||
backup:export [file] Export dokku configuration files
|
||||
backup:import [file] Import dokku configuration files
|
||||
backup:export [file], Export dokku configuration files
|
||||
backup:import [file], Import dokku configuration files
|
||||
EOF
|
||||
;;
|
||||
|
||||
|
||||
@@ -211,10 +211,10 @@ ${var}"
|
||||
|
||||
help | config:help)
|
||||
cat && cat<<EOF
|
||||
config (<app>|--global) Display all global or app-specific config vars
|
||||
config:get (<app>|--global) KEY Display a global or app-specific config value
|
||||
config:set (<app>|--global) KEY1=VALUE1 [KEY2=VALUE2 ...] Set one or more config vars
|
||||
config:unset (<app>|--global) KEY1 [KEY2 ...] Unset one or more config vars
|
||||
config (<app>|--global), Display all global or app-specific config vars
|
||||
config:get (<app>|--global) KEY, Display a global or app-specific config value
|
||||
config:set (<app>|--global) KEY1=VALUE1 [KEY2=VALUE2 ...], Set one or more config vars
|
||||
config:unset (<app>|--global) KEY1 [KEY2 ...], Unset one or more config vars
|
||||
EOF
|
||||
;;
|
||||
|
||||
|
||||
@@ -141,10 +141,10 @@ case "$1" in
|
||||
# Display usage help
|
||||
help)
|
||||
cat && cat<<EOF
|
||||
docker-options <app> Display apps docker options for all phases
|
||||
docker-options <app> <phase(s)> Display apps docker options for phase (comma-separated phase list)
|
||||
docker-options:add <app> <phase(s)> OPTION Add docker option to app for phase (comma-separated phase list)
|
||||
docker-options:remove <app> <phase(s)> OPTION Remove docker option from app for phase (comma-separated phase list)
|
||||
docker-options <app>, Display apps docker options for all phases
|
||||
docker-options <app> <phase(s)>, Display apps docker options for phase (comma separated phase list)
|
||||
docker-options:add <app> <phase(s)> OPTION, Add docker option to app for phase (comma separated phase list)
|
||||
docker-options:remove <app> <phase(s)> OPTION, Remove docker option from app for phase (comma separated phase list)
|
||||
EOF
|
||||
;;
|
||||
|
||||
|
||||
@@ -133,10 +133,10 @@ case "$1" in
|
||||
|
||||
help | domains:help)
|
||||
cat && cat<<EOF
|
||||
domains <app> List custom domains for app
|
||||
domains:add <app> DOMAIN Add a custom domain to app
|
||||
domains:clear <app> Clear all custom domains for app
|
||||
domains:remove <app> DOMAIN Remove a custom domain from app
|
||||
domains <app>, List custom domains for app
|
||||
domains:add <app> DOMAIN, Add a custom domain to app
|
||||
domains:clear <app>, Clear all custom domains for app
|
||||
domains:remove <app> DOMAIN, Remove a custom domain from app
|
||||
EOF
|
||||
;;
|
||||
|
||||
|
||||
@@ -174,8 +174,8 @@ EOF
|
||||
|
||||
help | nginx:help)
|
||||
cat && cat<<EOF
|
||||
nginx:import-ssl <app> Imports a tarball from stdin; should contain server.crt and server.key
|
||||
nginx:build-config <app> (Re)builds nginx config for given app
|
||||
nginx:import-ssl <app>, Imports a tarball from stdin; should contain server.crt and server.key
|
||||
nginx:build-config <app>, (Re)builds nginx config for given app
|
||||
EOF
|
||||
;;
|
||||
|
||||
|
||||
@@ -101,14 +101,14 @@ case "$1" in
|
||||
|
||||
help | ps:help)
|
||||
cat && cat<<EOF
|
||||
ps <app> List processes running in app container(s)
|
||||
ps:scale <app> <proc>=<count> [<proc>=<count>] Set how many processes of a given process to run
|
||||
ps:start <app> Start app container(s)
|
||||
ps:stop <app> Stop app container(s)
|
||||
ps:rebuild <app> Rebuild an app
|
||||
ps:rebuildall Rebuild all apps
|
||||
ps:restart <app> Restart app container(s)
|
||||
ps:restartall Restart all deployed app containers
|
||||
ps <app>, List processes running in app container(s)
|
||||
ps:scale <app> <proc>=<count> [<proc>=<count>], Set how many instances of a given process to run
|
||||
ps:start <app>, Start app container(s)
|
||||
ps:stop <app>, Stop app container(s)
|
||||
ps:rebuild <app>, Rebuild an app
|
||||
ps:rebuildall, Rebuild all apps
|
||||
ps:restart <app>, Restart app container(s)
|
||||
ps:restartall, Restart all deployed app containers
|
||||
EOF
|
||||
;;
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ case "$1" in
|
||||
|
||||
help | shell:help)
|
||||
cat && cat<<EOF
|
||||
shell Spawn dokku shell
|
||||
shell, Spawn dokku shell
|
||||
EOF
|
||||
;;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user