summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2010-12-17 12:28:52 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2010-12-17 12:28:52 +0100
commit2008022121376445dbe3e8c16f954a0458103e32 (patch)
treee5e0a50dba5f3aece60046fed4f90960cf857ac8
parent4e1601523c61ff50797a56e3c7e91394915f1351 (diff)
bugfix: enable backslash interpretation in _cli_ask_yesno() to allow newlines and such
-rw-r--r--libui.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/libui.sh b/libui.sh
index d195673..5e04b4a 100644
--- a/libui.sh
+++ b/libui.sh
@@ -715,9 +715,9 @@ _cli_ask_string_multiple () {
_cli_ask_yesno ()
{
- [ -z "$2" ] && echo -n "$1 (y/n): "
- [ "$2" = yes ] && echo -n "$1 (Y/n): "
- [ "$2" = no ] && echo -n "$1 (y/N): "
+ [ -z "$2" ] && echo -ne "$1 (y/n): "
+ [ "$2" = yes ] && echo -ne "$1 (Y/n): "
+ [ "$2" = no ] && echo -ne "$1 (y/N): "
read answer
answer=`tr '[:upper:]' '[:lower:]' <<< $answer`