utiliser les fonctions d'éditions de readline pour afficher la valeur par défaut

This commit is contained in:
Jephte CLAIN 2014-12-07 08:52:59 +04:00
parent 8d1f4d3859
commit afb9327fc5
3 changed files with 12 additions and 4 deletions

View File

@ -15,6 +15,9 @@
#export UTOOLS_INPUT_ENCODING=utf-8
#export UTOOLS_EDITOR_ENCODING=utf-8
# Ne pas utiliser la librairie readline pour la saisie des informations
#export UTOOLS_NO_READLINE=1
# Désactiver l'affichage en couleur pour les fonctions e*
#export UTOOLS_NO_COLORS=1

View File

@ -1 +1 @@
007007000
007008000

View File

@ -3162,9 +3162,14 @@ function __rv_read() {
else
tooenc_ "Entrez la valeur" "$UTF8" 1>&2
fi
[ -n "$__rv_d" ] && tooenc_ " [$__rv_d]" 1>&2
tooenc_ ": " "$UTF8" 1>&2
uread "${__rv_opts[@]}" __rv_r
if [ -n "$UTOOLS_NO_READLINE" ]; then
[ -n "$__rv_d" ] && tooenc_ " [$__rv_d]" 1>&2
tooenc_ ": " "$UTF8" 1>&2
uread "${__rv_opts[@]}" __rv_r
else
tooenc_ ": " "$UTF8" 1>&2
uread -e ${__rv_d:+-i"$__rv_d"} "${__rv_opts[@]}" __rv_r
fi
__rv_r="${__rv_r:-$__rv_d}"
if [ -n "$__rv_r" ] || ! is_yes "$__rv_re"; then
set_var "$__rv_v" "$__rv_r"