From 5c1ea83ef060de00bcf124874588a6c48b9f70a7 Mon Sep 17 00:00:00 2001 From: Bryan Roessler Date: Sun, 4 Aug 2024 00:53:50 -0400 Subject: [PATCH] Try printing modules in two columns --- workflow/qhtcp-workflow | 48 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/workflow/qhtcp-workflow b/workflow/qhtcp-workflow index 47b5490e..eea6e3ac 100755 --- a/workflow/qhtcp-workflow +++ b/workflow/qhtcp-workflow @@ -411,15 +411,38 @@ interactive_header() { # echo "" echo "Available Submodules:" + + # Determine if we need two columns if [ ${#ALL_SUBMODULES[@]} -gt 8 ]; then # Calculate the number of elements in each column num_columns=$(( (${#ALL_SUBMODULES[@]} + 1) / 2 )) + + # Determine the maximum width of the first column + max_width=0 + for ((i=0; i