Merge pull request 'Adapt --help output to Click-like format' (#20) from new-help into main

Reviewed-on: autonomic-cooperative/abra#20
This commit is contained in:
3wordchant 2020-10-23 03:56:50 +02:00
commit 3c7c7694bf

26
abra
View File

@ -155,22 +155,24 @@ fi
###### Global help
sub_help() {
echo "Usage: $PROGRAM_NAME [-a STACK_NAME] [-c CONFIG] [-e ENV_FILE] <subcommand> [options]"
echo "Usage: $PROGRAM_NAME [OPTIONS] COMMAND [ARGS]..."
echo ""
echo "Subcommands:"
echo " context [--help] [SUBCOMMAND] manage remote swarm contexts"
echo " cp SRC_PATH SERVICE:DEST_PATH copy files to a container"
echo "Options:"
echo " --config Stack configuration to use"
echo " --env Environment variables to load"
echo " --help Show this message and exit"
echo " --stack Name of the target stack"
echo " --version Show program version"
echo ""
echo "Commands:"
echo " context manage remote swarm contexts"
echo " cp copy files to a container"
echo " deploy let 'em rip"
echo " logs SERVICE [ARGS] tail logs from a deployed service"
echo " logs tail logs from a deployed service"
echo " multilogs tail logs from a whole stackk"
echo " run [-u USER] SERVICE CMD run a command in the specified service's container"
echo " secret [--help] [SUBCOMMAND] manage secrets"
echo " run run a command in the specified service's container"
echo " secret manage secrets"
echo " upgrade upgrade to the latest version"
echo " ... (custom commands)"
echo ""
echo "Make sure \$STACK_NAME is set using direnv, -a, -e or -c"
echo ""
echo "Runs compose.yml by default, set e.g. COMPOSE_FILE=\"compose.yml:compose2.yml\" to override"
}
###### Subcommand `secret`