Use same [] style once more
This commit is contained in:
parent
e8c0efa91e
commit
74dfd75fb1
43
abra
43
abra
@ -25,7 +25,7 @@ Usage:
|
|||||||
abra [options] app <domain> secret auto
|
abra [options] app <domain> secret auto
|
||||||
abra [options] app <domain> secret generate <secret> <version> [<cmd>] [--pass]
|
abra [options] app <domain> secret generate <secret> <version> [<cmd>] [--pass]
|
||||||
abra [options] app <domain> secret insert <secret> <version> <data> [--pass]
|
abra [options] app <domain> secret insert <secret> <version> <data> [--pass]
|
||||||
abra [options] app <domain> secret (delete|rm) (<secret>|--all) [--pass --force]
|
abra [options] app <domain> secret (delete|rm) (<secret>|--all) [--pass] [--force]
|
||||||
abra [options] server add <host> [<user>] [<port>]
|
abra [options] server add <host> [<user>] [<port>]
|
||||||
abra [options] server (list|ls)
|
abra [options] server (list|ls)
|
||||||
abra [options] server rm <host>
|
abra [options] server rm <host>
|
||||||
@ -142,11 +142,11 @@ eval "var_$1+=($value)"; else eval "var_$1=$value"; fi; return 0; fi; done
|
|||||||
return 1; }; stdout() { printf -- "cat <<'EOM'\n%s\nEOM\n" "$1"; }; stderr() {
|
return 1; }; stdout() { printf -- "cat <<'EOM'\n%s\nEOM\n" "$1"; }; stderr() {
|
||||||
printf -- "cat <<'EOM' >&2\n%s\nEOM\n" "$1"; }; error() {
|
printf -- "cat <<'EOM' >&2\n%s\nEOM\n" "$1"; }; error() {
|
||||||
[[ -n $1 ]] && stderr "$1"; stderr "$usage"; _return 1; }; _return() {
|
[[ -n $1 ]] && stderr "$1"; stderr "$usage"; _return 1; }; _return() {
|
||||||
printf -- "exit %d\n" "$1"; exit "$1"; }; set -e; trimmed_doc=${DOC:1:1397}
|
printf -- "exit %d\n" "$1"; exit "$1"; }; set -e; trimmed_doc=${DOC:1:1399}
|
||||||
usage=${DOC:40:1089}; digest=0f850; shorts=(-h -s -e -v '' '' '' '' '' '' '')
|
usage=${DOC:40:1091}; digest=20a44; shorts=(-s -e -h -v '' '' '' '' '' '' '')
|
||||||
longs=(--help --stack --env --version --server --domain --pass --auto --force --user --all)
|
longs=(--stack --env --help --version --server --domain --pass --auto --force --user --all)
|
||||||
argcounts=(0 1 1 0 1 1 0 0 0 1 0); node_0(){ switch __help 0; }; node_1(){
|
argcounts=(1 1 0 0 1 1 0 0 0 1 0); node_0(){ value __stack 0; }; node_1(){
|
||||||
value __stack 1; }; node_2(){ value __env 2; }; node_3(){ switch __version 3; }
|
value __env 1; }; node_2(){ switch __help 2; }; node_3(){ switch __version 3; }
|
||||||
node_4(){ value __server 4; }; node_5(){ value __domain 5; }; node_6(){
|
node_4(){ value __server 4; }; node_5(){ value __domain 5; }; node_6(){
|
||||||
switch __pass 6; }; node_7(){ switch __auto 7; }; node_8(){ switch __force 8; }
|
switch __pass 6; }; node_7(){ switch __auto 7; }; node_8(){ switch __force 8; }
|
||||||
node_9(){ value __user 9; }; node_10(){ switch __all 10; }; node_11(){
|
node_9(){ value __user 9; }; node_10(){ switch __all 10; }; node_11(){
|
||||||
@ -178,25 +178,24 @@ required 48 25 12 36 14 15; }; node_68(){ optional 9; }; node_69(){ oneormore 16
|
|||||||
required 48 25 12 37 13 69; }; node_72(){ required 48 25 12 38 39; }; node_73(){
|
required 48 25 12 37 13 69; }; node_72(){ required 48 25 12 38 39; }; node_73(){
|
||||||
optional 19; }; node_74(){ required 48 25 12 38 40 17 18 73 51; }; node_75(){
|
optional 19; }; node_74(){ required 48 25 12 38 40 17 18 73 51; }; node_75(){
|
||||||
required 48 25 12 38 41 17 18 20 51; }; node_76(){ either 17 10; }; node_77(){
|
required 48 25 12 38 41 17 18 20 51; }; node_76(){ either 17 10; }; node_77(){
|
||||||
required 76; }; node_78(){ optional 6 8; }; node_79(){
|
required 76; }; node_78(){ required 48 25 12 38 61 77 51 62; }; node_79(){
|
||||||
required 48 25 12 38 61 77 78; }; node_80(){ optional 22; }; node_81(){
|
optional 22; }; node_80(){ optional 23; }; node_81(){ required 48 42 43 21 79 80
|
||||||
optional 23; }; node_82(){ required 48 42 43 21 80 81; }; node_83(){
|
}; node_82(){ required 48 42 55; }; node_83(){ required 48 42 33 21; }
|
||||||
required 48 42 55; }; node_84(){ required 48 42 33 21; }; node_85(){
|
node_84(){ required 48 42 44 21; }; node_85(){ required 48 42 45 21; }
|
||||||
required 48 42 44 21; }; node_86(){ required 48 42 45 21; }; node_87(){
|
node_86(){ required 48 46; }; node_87(){ optional 69; }; node_88(){
|
||||||
required 48 46; }; node_88(){ optional 69; }; node_89(){ required 48 24 88; }
|
required 48 24 87; }; node_89(){
|
||||||
node_90(){
|
either 53 56 57 58 59 63 65 66 67 70 71 72 74 75 78 81 82 83 84 85 86 88; }
|
||||||
either 53 56 57 58 59 63 65 66 67 70 71 72 74 75 79 82 83 84 85 86 87 89; }
|
node_90(){ required 89; }; cat <<<' docopt_exit() {
|
||||||
node_91(){ required 90; }; cat <<<' docopt_exit() {
|
[[ -n $1 ]] && printf "%s\n" "$1" >&2; printf "%s\n" "${DOC:40:1091}" >&2
|
||||||
[[ -n $1 ]] && printf "%s\n" "$1" >&2; printf "%s\n" "${DOC:40:1089}" >&2
|
exit 1; }'; unset var___stack var___env var___help var___version var___server \
|
||||||
exit 1; }'; unset var___help var___stack var___env var___version var___server \
|
|
||||||
var___domain var___pass var___auto var___force var___user var___all var__app_ \
|
var___domain var___pass var___auto var___force var___user var___all var__app_ \
|
||||||
var__domain_ var__service_ var__src_ var__dst_ var__args_ var__secret_ \
|
var__domain_ var__service_ var__src_ var__dst_ var__args_ var__secret_ \
|
||||||
var__version_ var__cmd_ var__data_ var__host_ var__user_ var__port_ \
|
var__version_ var__cmd_ var__data_ var__host_ var__user_ var__port_ \
|
||||||
var__command_ var_app var_new var_list var_ls var_deploy var_undeploy \
|
var__command_ var_app var_new var_list var_ls var_deploy var_undeploy \
|
||||||
var_config var_delete var_rm var_logs var_multilogs var_cp var_run var_secret \
|
var_config var_delete var_rm var_logs var_multilogs var_cp var_run var_secret \
|
||||||
var_auto var_generate var_insert var_server var_add var_use var_init var_upgrade
|
var_auto var_generate var_insert var_server var_add var_use var_init var_upgrade
|
||||||
parse 91 "$@"; local prefix=${DOCOPT_PREFIX:-''}; unset "${prefix}__help" \
|
parse 90 "$@"; local prefix=${DOCOPT_PREFIX:-''}; unset "${prefix}__stack" \
|
||||||
"${prefix}__stack" "${prefix}__env" "${prefix}__version" "${prefix}__server" \
|
"${prefix}__env" "${prefix}__help" "${prefix}__version" "${prefix}__server" \
|
||||||
"${prefix}__domain" "${prefix}__pass" "${prefix}__auto" "${prefix}__force" \
|
"${prefix}__domain" "${prefix}__pass" "${prefix}__auto" "${prefix}__force" \
|
||||||
"${prefix}__user" "${prefix}__all" "${prefix}_app_" "${prefix}_domain_" \
|
"${prefix}__user" "${prefix}__all" "${prefix}_app_" "${prefix}_domain_" \
|
||||||
"${prefix}_service_" "${prefix}_src_" "${prefix}_dst_" "${prefix}_args_" \
|
"${prefix}_service_" "${prefix}_src_" "${prefix}_dst_" "${prefix}_args_" \
|
||||||
@ -207,9 +206,9 @@ parse 91 "$@"; local prefix=${DOCOPT_PREFIX:-''}; unset "${prefix}__help" \
|
|||||||
"${prefix}logs" "${prefix}multilogs" "${prefix}cp" "${prefix}run" \
|
"${prefix}logs" "${prefix}multilogs" "${prefix}cp" "${prefix}run" \
|
||||||
"${prefix}secret" "${prefix}auto" "${prefix}generate" "${prefix}insert" \
|
"${prefix}secret" "${prefix}auto" "${prefix}generate" "${prefix}insert" \
|
||||||
"${prefix}server" "${prefix}add" "${prefix}use" "${prefix}init" \
|
"${prefix}server" "${prefix}add" "${prefix}use" "${prefix}init" \
|
||||||
"${prefix}upgrade"; eval "${prefix}"'__help=${var___help:-false}'
|
"${prefix}upgrade"; eval "${prefix}"'__stack=${var___stack:-}'
|
||||||
eval "${prefix}"'__stack=${var___stack:-}'
|
|
||||||
eval "${prefix}"'__env=${var___env:-}'
|
eval "${prefix}"'__env=${var___env:-}'
|
||||||
|
eval "${prefix}"'__help=${var___help:-false}'
|
||||||
eval "${prefix}"'__version=${var___version:-false}'
|
eval "${prefix}"'__version=${var___version:-false}'
|
||||||
eval "${prefix}"'__server=${var___server:-}'
|
eval "${prefix}"'__server=${var___server:-}'
|
||||||
eval "${prefix}"'__domain=${var___domain:-}'
|
eval "${prefix}"'__domain=${var___domain:-}'
|
||||||
@ -249,7 +248,7 @@ eval "${prefix}"'add=${var_add:-false}'; eval "${prefix}"'use=${var_use:-false}'
|
|||||||
eval "${prefix}"'init=${var_init:-false}'
|
eval "${prefix}"'init=${var_init:-false}'
|
||||||
eval "${prefix}"'upgrade=${var_upgrade:-false}'; local docopt_i=1
|
eval "${prefix}"'upgrade=${var_upgrade:-false}'; local docopt_i=1
|
||||||
[[ $BASH_VERSION =~ ^4.3 ]] && docopt_i=2; for ((;docopt_i>0;docopt_i--)); do
|
[[ $BASH_VERSION =~ ^4.3 ]] && docopt_i=2; for ((;docopt_i>0;docopt_i--)); do
|
||||||
declare -p "${prefix}__help" "${prefix}__stack" "${prefix}__env" \
|
declare -p "${prefix}__stack" "${prefix}__env" "${prefix}__help" \
|
||||||
"${prefix}__version" "${prefix}__server" "${prefix}__domain" "${prefix}__pass" \
|
"${prefix}__version" "${prefix}__server" "${prefix}__domain" "${prefix}__pass" \
|
||||||
"${prefix}__auto" "${prefix}__force" "${prefix}__user" "${prefix}__all" \
|
"${prefix}__auto" "${prefix}__force" "${prefix}__user" "${prefix}__all" \
|
||||||
"${prefix}_app_" "${prefix}_domain_" "${prefix}_service_" "${prefix}_src_" \
|
"${prefix}_app_" "${prefix}_domain_" "${prefix}_service_" "${prefix}_src_" \
|
||||||
|
Reference in New Issue
Block a user