mirror of
https://github.com/the-sane/lug-helper.git
synced 2024-12-29 06:24:18 +00:00
Merge pull request #61 from LovingMelody/master
Fix: Fix screen clear when flags are used
This commit is contained in:
commit
45029a7797
@ -369,14 +369,12 @@ message() {
|
|||||||
"info")
|
"info")
|
||||||
# info message
|
# info message
|
||||||
# call format: message info "text to display"
|
# call format: message info "text to display"
|
||||||
clear
|
|
||||||
printf "\n$2\n\n"
|
printf "\n$2\n\n"
|
||||||
read -n 1 -s -p "Press any key..."
|
read -n 1 -s -p "Press any key..."
|
||||||
;;
|
;;
|
||||||
"warning")
|
"warning")
|
||||||
# warning message
|
# warning message
|
||||||
# call format: message warning "text to display"
|
# call format: message warning "text to display"
|
||||||
clear
|
|
||||||
printf "\n$2\n\n"
|
printf "\n$2\n\n"
|
||||||
read -n 1 -s -p "Press any key..."
|
read -n 1 -s -p "Press any key..."
|
||||||
;;
|
;;
|
||||||
@ -389,7 +387,6 @@ message() {
|
|||||||
"question")
|
"question")
|
||||||
# question
|
# question
|
||||||
# call format: if message question "question to ask?"; then...
|
# call format: if message question "question to ask?"; then...
|
||||||
clear
|
|
||||||
printf "$2\n"
|
printf "$2\n"
|
||||||
while read -p "[y/n]: " yn; do
|
while read -p "[y/n]: " yn; do
|
||||||
case "$yn" in
|
case "$yn" in
|
||||||
@ -539,8 +536,8 @@ menu() {
|
|||||||
matched="false"
|
matched="false"
|
||||||
for (( i=0; i<"${#menu_options[@]}"; i++ )); do
|
for (( i=0; i<"${#menu_options[@]}"; i++ )); do
|
||||||
if [ "$choice" = "${menu_options[i]}" ]; then
|
if [ "$choice" = "${menu_options[i]}" ]; then
|
||||||
|
clear
|
||||||
# Execute the corresponding action
|
# Execute the corresponding action
|
||||||
printf "\n\n"
|
|
||||||
${menu_actions[i]}
|
${menu_actions[i]}
|
||||||
matched="true"
|
matched="true"
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user