Remove BASH_VERSION check, just stick with lowest common denominator ;)

This commit is contained in:
Stephen Tudor 2018-11-15 10:13:51 -05:00
parent a8ec4d6c57
commit 516f835ad3
1 changed files with 2 additions and 6 deletions

8
burrow
View File

@ -566,12 +566,8 @@ getline () {
_var=${2:-_line}
_default="$3"
if [ -t 0 ]; then
if [ -n "$BASH_VERSION" ]; then
read -erp "$1: " "$_var"
else
printf "%s: " "$1"
IFS= read -r "$_var"
fi
printf "%s: " "$1"
IFS= read -r "$_var"
# use default if possible when input is blank
_val=$(eval echo \$${_var})
if [ ! -n "$_val" ] && [ -n "$_default" ]; then