diff --git a/commands.beta/dorothy-new b/commands.beta/dorothy-new index c8a72ff97..37192900b 100755 --- a/commands.beta/dorothy-new +++ b/commands.beta/dorothy-new @@ -50,7 +50,7 @@ function dorothy_new() ( local item type='' cmd='' where='' path='' tmp='' local cli='' app='' name='' setup_util_args=() local args='' stdin='' distinct='' finish='' - local vargs='' sargs=() bflags=() sflags=() # @todo add parsing + local vargs='' sargs=() bflags=() sflags=() # @todo add parsing local invocation='' about='' input='' output='' # @todo add parsing while test "$#" -ne 0; do item="$1" @@ -115,11 +115,11 @@ function dorothy_new() ( else type="$( choose-option --no-title --required \ - --question="What type of command is this?" \ - --label -- \ - command "$(echo-style --bold="command")"$'\nprocess arguments, execute something' \ - transform "$(echo-style --bold="echo-*")"$'\ntransform input (args/stdin) into modified output' \ - install "$(echo-style --bold="setup-util-*")"$'\ncross-platform installer for a package or application' \ + --question="What type of command is this?" \ + --label -- \ + command "$(echo-style --bold="command")"$'\nprocess arguments, execute something' \ + transform "$(echo-style --bold="echo-*")"$'\ntransform input (args/stdin) into modified output' \ + install "$(echo-style --bold="setup-util-*")"$'\ncross-platform installer for a package or application' )" fi done @@ -136,12 +136,12 @@ function dorothy_new() ( function ask_where { where="$( choose-option --no-title --required \ - --question="Where should the $1 go?" \ - --label --default="$where" -- \ - user "$(echo-style --bold="user/commands")"$'\nyour public configuration' \ - local "$(echo-style --bold="user/commands.local")"$'\nyour private configuration' \ - core "$(echo-style --bold="dorothy/commands")"$'\nthe dorothy core' \ - beta "$(echo-style --bold="dorothy/commands.beta")"$'\nthe dorothy beta core' + --question="Where should the $1 go?" \ + --label --default="$where" -- \ + user "$(echo-style --bold="user/commands")"$'\nyour public configuration' \ + local "$(echo-style --bold="user/commands.local")"$'\nyour private configuration' \ + core "$(echo-style --bold="dorothy/commands")"$'\nthe dorothy core' \ + beta "$(echo-style --bold="dorothy/commands.beta")"$'\nthe dorothy beta core' )" case "$where" in user) path="$DOROTHY/user/commands/$cmd" ;; @@ -177,7 +177,7 @@ function dorothy_new() ( ask_where 'command' ;; transform) - ask_cmd --question="What to name the transformer? It should start with $(echo-style --code='echo-')" # once ai generations done, this should be last + ask_cmd --question="What to name the transformer? It should start with $(echo-style --code='echo-')" # once ai generations done, this should be last ask_where 'transformer' if test -z "$args"; then if confirm --positive --ppid=$$ -- 'Should it transform arguments?'; then @@ -249,7 +249,7 @@ function dorothy_new() ( --question="Which ecosystems does $name have a package on" \ --label -- "${eco_options[@]}" ) - for eco in "${ecosystems[@]}"; do + for eco in "${ecos_selection[@]}"; do ecos["$eco"]="$(ask --question="What is the $eco package name?")" done ;; diff --git a/docs/scripting/generator.md b/docs/scripting/generator.md index 44d545f3e..9213d6892 100644 --- a/docs/scripting/generator.md +++ b/docs/scripting/generator.md @@ -2,7 +2,7 @@ The following is a proposal for a new command generator: -``` +```plain What type of command is this? normal: process arguments, execute something echo-*: transform input (args/stdin) into modified output