diff --git a/workflow/qhtcp-workflow b/workflow/qhtcp-workflow index f40ee2e4..a1aa1b81 100755 --- a/workflow/qhtcp-workflow +++ b/workflow/qhtcp-workflow @@ -532,12 +532,13 @@ interactive_header() { for ((c=1; c<2; c++)); do # safe loop that only runs once echo cat <<-EOF - Enter project number(s) to analyze: - * A comma-separated list of project numbers (ex. 2,5,12) + Enter project number(s) to analyze: + * for the latest project ($num) (default) + * A comma-separated list of project numbers (2,5,12) * 0 to add a new project - * for the latest project ($num) EOF ((YES)) || read -r -p "($num): " response + echo "" if [[ $response == 0 ]]; then ask_pn && PROJECTS+=("${ADD_PROJECTS[@]}") else @@ -567,13 +568,13 @@ interactive_header() { if [[ ${#MODULES[@]} -eq 0 && ${#EXCLUDE_MODULES[@]} -eq 0 ]]; then cat <<-EOF - Enter modules(s) to run: - * A comma-separated list of module numbers - * Example: 2,5,12 - * 0 for none - * for all modules (default) + Enter modules(s) to run: + * for all (default) + * A comma-separated list of module numbers (2,5,12) + * 0 for none EOF ((YES)) || read -r -p "(all): " response + echo "" if [[ -z $response ]]; then MODULES=("${ALL_MODULES[@]}") elif [[ $response -eq 0 ]]; then @@ -591,13 +592,14 @@ interactive_header() { while :; do cat <<-EOF Enter submodules(s) to run followed by its arguments in a comma-separated string - * Quote your string if there are any whitespaces + * for none (default) * A comma-separated list of submodules and their arguments * Both arguments are required + * Quote the argument string if it contains whitespace * Example: ${ALL_SUBMODULES[0]},\"arg1,arg2,arg3...\",${ALL_SUBMODULES[1]},\"arg1,arg2,arg3...\" - * for none (default) EOF ((YES)) || read -r -p "(none): " response + echo "" [[ -z $response ]] && break IFS=',' read -ra arr <<< "$response" if [[ $((${#arr[@]} % 2)) -eq 0 ]]; then # check if array is even @@ -1262,10 +1264,17 @@ qhtcp() { if [[ -d $QHTCP_PROJECT_DIR ]]; then # Handle existing output directory - echo "A project already exists at $QHTCP_PROJECT_DIR" - echo "Would you like to (c)ontinue, (u)pdate it from the template and continue, or (b)ack it up and continue from scratch?" + cat <<-EOF + A project already exists at $QHTCP_PROJECT_DIR + Would you like to + * (c)ontinue (default) + * (u)pdate it from the template and continue + * (b)ack it up and start from scratch + EOF + for i in {1..3}; do # give the user three chances to get it right - ((YES)) || read -r -p "Hit [Enter] or c to continue: " response + ((YES)) || read -r -p "(c): " response + echo "" [[ -z $response ]] && break case $response in u)