From 6bae48431ce5d7e9deb46c4cdaea719cd28b02b9 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Sun, 1 Nov 2020 20:41:58 +0100 Subject: [PATCH] Use same style as other [] options --- abra | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/abra b/abra index a85f195..144f149 100755 --- a/abra +++ b/abra @@ -11,7 +11,7 @@ DOC=" The cooperative cloud utility belt 🎩🐇 Usage: - abra [options] app new [--server= --domain= --pass] + abra [options] app new [--server=] [--domain=] [--pass] abra [options] app (list|ls) abra [options] app deploy abra [options] app undeploy @@ -142,8 +142,8 @@ 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() { printf -- "cat <<'EOM' >&2\n%s\nEOM\n" "$1"; }; error() { [[ -n $1 ]] && stderr "$1"; stderr "$usage"; _return 1; }; _return() { -printf -- "exit %d\n" "$1"; exit "$1"; }; set -e; trimmed_doc=${DOC:1:1384} -usage=${DOC:40:1076}; digest=c5735; shorts=(-e -s -v -h '' '' '' '' '' '') +printf -- "exit %d\n" "$1"; exit "$1"; }; set -e; trimmed_doc=${DOC:1:1388} +usage=${DOC:40:1080}; digest=112a7; shorts=(-e -s -v -h '' '' '' '' '' '') longs=(--env --stack --version --help --server --domain --pass --force --user --all) argcounts=(1 1 0 0 1 1 0 0 1 0); node_0(){ value __env 0; }; node_1(){ value __stack 1; }; node_2(){ switch __version 2; }; node_3(){ switch __help 3 @@ -164,29 +164,29 @@ node_37(){ _command secret; }; node_38(){ _command auto; }; node_39(){ _command generate; }; node_40(){ _command insert; }; node_41(){ _command server }; node_42(){ _command add; }; node_43(){ _command use; }; node_44(){ _command init; }; node_45(){ _command upgrade; }; node_46(){ optional 0 1 2 3; } -node_47(){ optional 46; }; node_48(){ optional 4 5 6; }; node_49(){ -required 47 24 25 48 10; }; node_50(){ either 26 27; }; node_51(){ required 50 -}; node_52(){ required 47 24 51; }; node_53(){ required 47 24 11 28; } -node_54(){ required 47 24 11 29; }; node_55(){ required 47 24 11 30; } -node_56(){ either 31 32; }; node_57(){ required 56; }; node_58(){ optional 7; } -node_59(){ required 47 24 11 57 58; }; node_60(){ optional 12; }; node_61(){ -required 47 24 11 33 60; }; node_62(){ required 47 24 11 34; }; node_63(){ -required 47 24 11 35 13 14; }; node_64(){ optional 8; }; node_65(){ oneormore 15 -}; node_66(){ required 47 24 11 36 64 12 65; }; node_67(){ -required 47 24 11 36 12 65; }; node_68(){ required 47 24 11 37 38; }; node_69(){ -optional 18; }; node_70(){ optional 6; }; node_71(){ -required 47 24 11 37 39 16 17 69 70; }; node_72(){ -required 47 24 11 37 40 16 17 19 70; }; node_73(){ either 16 9; }; node_74(){ -required 73; }; node_75(){ optional 6 7; }; node_76(){ -required 47 24 11 37 57 74 75; }; node_77(){ optional 21; }; node_78(){ -optional 22; }; node_79(){ required 47 41 42 20 77 78; }; node_80(){ -required 47 41 51; }; node_81(){ required 47 41 32 20; }; node_82(){ -required 47 41 43 20; }; node_83(){ required 47 41 44 20; }; node_84(){ -required 47 45; }; node_85(){ optional 65; }; node_86(){ required 47 23 85; } -node_87(){ -either 49 52 53 54 55 59 61 62 63 66 67 68 71 72 76 79 80 81 82 83 84 86; } -node_88(){ required 87; }; cat <<<' docopt_exit() { -[[ -n $1 ]] && printf "%s\n" "$1" >&2; printf "%s\n" "${DOC:40:1076}" >&2 +node_47(){ optional 46; }; node_48(){ optional 4; }; node_49(){ optional 5; } +node_50(){ optional 6; }; node_51(){ required 47 24 25 48 49 50 10; } +node_52(){ either 26 27; }; node_53(){ required 52; }; node_54(){ +required 47 24 53; }; node_55(){ required 47 24 11 28; }; node_56(){ +required 47 24 11 29; }; node_57(){ required 47 24 11 30; }; node_58(){ +either 31 32; }; node_59(){ required 58; }; node_60(){ optional 7; }; node_61(){ +required 47 24 11 59 60; }; node_62(){ optional 12; }; node_63(){ +required 47 24 11 33 62; }; node_64(){ required 47 24 11 34; }; node_65(){ +required 47 24 11 35 13 14; }; node_66(){ optional 8; }; node_67(){ oneormore 15 +}; node_68(){ required 47 24 11 36 66 12 67; }; node_69(){ +required 47 24 11 36 12 67; }; node_70(){ required 47 24 11 37 38; }; node_71(){ +optional 18; }; node_72(){ required 47 24 11 37 39 16 17 71 50; }; node_73(){ +required 47 24 11 37 40 16 17 19 50; }; node_74(){ either 16 9; }; node_75(){ +required 74; }; node_76(){ optional 6 7; }; node_77(){ +required 47 24 11 37 59 75 76; }; node_78(){ optional 21; }; node_79(){ +optional 22; }; node_80(){ required 47 41 42 20 78 79; }; node_81(){ +required 47 41 53; }; node_82(){ required 47 41 32 20; }; node_83(){ +required 47 41 43 20; }; node_84(){ required 47 41 44 20; }; node_85(){ +required 47 45; }; node_86(){ optional 67; }; node_87(){ required 47 23 86; } +node_88(){ +either 51 54 55 56 57 61 63 64 65 68 69 70 72 73 77 80 81 82 83 84 85 87; } +node_89(){ required 88; }; cat <<<' docopt_exit() { +[[ -n $1 ]] && printf "%s\n" "$1" >&2; printf "%s\n" "${DOC:40:1080}" >&2 exit 1; }'; unset var___env var___stack var___version var___help var___server \ var___domain var___pass var___force var___user var___all var__app_ \ var__domain_ var__service_ var__src_ var__dst_ var__args_ var__secret_ \ @@ -194,7 +194,7 @@ 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_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 -parse 88 "$@"; local prefix=${DOCOPT_PREFIX:-''}; unset "${prefix}__env" \ +parse 89 "$@"; local prefix=${DOCOPT_PREFIX:-''}; unset "${prefix}__env" \ "${prefix}__stack" "${prefix}__version" "${prefix}__help" "${prefix}__server" \ "${prefix}__domain" "${prefix}__pass" "${prefix}__force" "${prefix}__user" \ "${prefix}__all" "${prefix}_app_" "${prefix}_domain_" "${prefix}_service_" \