indenter l'affichage des fonctions qui demandent une saisie de l'utilisateur

This commit is contained in:
Jephté Clain 2016-05-23 12:12:42 +04:00
parent 86a5787510
commit 12c521cfb2
1 changed files with 14 additions and 14 deletions

View File

@ -3520,11 +3520,11 @@ function ask_yesno() {
local r
is_yes "$default" && prompt="[On]"
if [ -n "$message" ]; then
tooenc_ "$message" 1>&2
__eecho_ "$message" 1>&2
else
tooenc_ "Voulez-vous continuer?" "$UTF8" 1>&2
OENC="$UTF8" __eecho_ "Voulez-vous continuer?" 1>&2
fi
tooenc_ " $prompt " "$UTF8" 1>&2
OENC="$UTF8" tooenc_ " $prompt " 1>&2
uread r
is_yes "${r:-$default}"
else
@ -3579,12 +3579,12 @@ function __rv_read() {
local __rv_r
while true; do
if [ -n "$__rv_msg" ]; then
tooenc_ "$__rv_msg" 1>&2
__eecho_ "$__rv_msg" 1>&2
else
tooenc_ "Entrez la valeur" "$UTF8" 1>&2
OENC="$UTF8" __eecho_ "Entrez la valeur" 1>&2
fi
if [ -n "$__rv_readline" ]; then
tooenc_ ": " "$UTF8" 1>&2
OENC="$UTF8" tooenc_ ": " 1>&2
uread -e ${__rv_d:+-i"$__rv_d"} "${__rv_opts[@]}" __rv_r
else
if [ -n "$__rv_d" ]; then
@ -3594,7 +3594,7 @@ function __rv_read() {
tooenc_ " [****]" 1>&2
fi
fi
tooenc_ ": " "$UTF8" 1>&2
OENC="$UTF8" tooenc_ ": " 1>&2
uread "${__rv_opts[@]}" __rv_r
[ -n "$__rv_nl" ] && echo
fi
@ -3632,13 +3632,13 @@ function simple_menu() {
while true; do
if [ "$__sm_c" == "0" ]; then
# Afficher le menu
[ -n "$__sm_title" ] && tooenc "=== $__sm_title ===" 1>&2
[ -n "$__sm_title" ] && __eecho "=== $__sm_title ===" 1>&2
__sm_i=1
for __sm_option in "${__sm_options[@]}"; do
if [ "$__sm_option" == "$__sm_default" ]; then
tooenc "$__sm_i*- $__sm_option" 1>&2
__eecho "$__sm_i*- $__sm_option" 1>&2
else
tooenc "$__sm_i - $__sm_option" 1>&2
__eecho "$__sm_i - $__sm_option" 1>&2
fi
let __sm_i=$__sm_i+1
done
@ -3646,11 +3646,11 @@ function simple_menu() {
# Afficher les choix
if [ -n "$__sm_yourchoice" ]; then
tooenc_ "$__sm_yourchoice" 1>&2
__eecho_ "$__sm_yourchoice" 1>&2
else
tooenc_ "Entrez le numéro de l'option choisie" "$UTF8" 1>&2
OENC="$UTF8" __eecho_ "Entrez le numéro de l'option choisie" 1>&2
fi
tooenc_ ": " "$UTF8" 1>&2
OENC="$UTF8" tooenc_ ": " 1>&2
uread __sm_choice
# Valeur par défaut
@ -3673,7 +3673,7 @@ function simple_menu() {
let __sm_c=$__sm_c+1
if [ "$__sm_c" -eq 5 ]; then
# sauter une ligne toutes les 4 tentatives
tooenc "" "$UTF8" 1>&2
OENC="$UTF8" tooenc "" 1>&2
__sm_c=0
fi
done