From 32d57e9c2b743a733a7b671c3dd824dd07b4c408 Mon Sep 17 00:00:00 2001 From: Melody Renata Date: Fri, 28 Jul 2023 21:44:48 -0400 Subject: [PATCH] Fix: Fix screen clear when flags are used --- lug-helper.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lug-helper.sh b/lug-helper.sh index b260ef9..dd58802 100755 --- a/lug-helper.sh +++ b/lug-helper.sh @@ -369,14 +369,12 @@ message() { "info") # info message # call format: message info "text to display" - clear printf "\n$2\n\n" read -n 1 -s -p "Press any key..." ;; "warning") # warning message # call format: message warning "text to display" - clear printf "\n$2\n\n" read -n 1 -s -p "Press any key..." ;; @@ -389,7 +387,6 @@ message() { "question") # question # call format: if message question "question to ask?"; then... - clear printf "$2\n" while read -p "[y/n]: " yn; do case "$yn" in @@ -539,8 +536,8 @@ menu() { matched="false" for (( i=0; i<"${#menu_options[@]}"; i++ )); do if [ "$choice" = "${menu_options[i]}" ]; then + clear # Execute the corresponding action - printf "\n\n" ${menu_actions[i]} matched="true" break