Daniel Gibbs 9 ani în urmă
părinte
comite
fd0f6f730d
1 a modificat fișierele cu 19 adăugiri și 19 ștergeri
  1. 19 19
      lgsm/functions/core_messages.sh

+ 19 - 19
lgsm/functions/core_messages.sh

@@ -271,25 +271,25 @@ fn_print_information_nl(){
 
 # Y/N Prompt
 fn_prompt_yn(){
-  local prompt="$1"
-  local initial="$2"
-
-  if [ "${initial}" == "Y" ]; then
-    prompt+=" [Y/n] "
-  elif [ "${initial}" == "N" ]; then
-    prompt+=" [y/N] "
-  else
-    prompt+=" [y/n] "
-  fi
-
-  while true; do
-    read -e -i "${initial}" -p  "${prompt}" -r yn
-    case "${yn}" in
-      [Yy]|[Yy][Ee][Ss]) return 0 ;;
-      [Nn]|[Nn][Oo]) return 1 ;;
-      *) echo "Please answer yes or no." ;;
-    esac
-  done
+	local prompt="$1"
+	local initial="$2"
+
+	if [ "${initial}" == "Y" ]; then
+		prompt+=" [Y/n] "
+	elif [ "${initial}" == "N" ]; then
+		prompt+=" [y/N] "
+	else
+		prompt+=" [y/n] "
+	fi
+
+	while true; do
+		read -e -i "${initial}" -p  "${prompt}" -r yn
+		case "${yn}" in
+			[Yy]|[Yy][Ee][Ss]) return 0 ;;
+			[Nn]|[Nn][Oo]) return 1 ;;
+		*) echo "Please answer yes or no." ;;
+		esac
+	done
 }
 
 # On-Screen End of Line