Imported from ../bash-3.0.tar.gz.
This commit is contained in:
@@ -125,11 +125,11 @@ function getline
|
||||
unset linesave # forget temp var
|
||||
;;
|
||||
)
|
||||
while [ "${line% }" != "$line" -a ${#line} != 0 ] ; do
|
||||
while [ "${line% }" != "$line" ] && [ ${#line} != 0 ] ; do
|
||||
echo -n " "
|
||||
line="${line%?}"
|
||||
done
|
||||
while [ "${line% }" = "$line" -a ${#line} != 0 ] ; do
|
||||
while [ "${line% }" = "$line" ] && [ ${#line} != 0 ] ; do
|
||||
echo -n " "
|
||||
line="${line%?}"
|
||||
done
|
||||
@@ -151,7 +151,7 @@ function getline
|
||||
* ) # Append character to the end of the line.
|
||||
# If length is restricted, and the line is too
|
||||
# long, then beep...
|
||||
|
||||
|
||||
if [ "$2" != 0 ] && [ $(( ${#line} >= $2 )) = 1 ] ; then
|
||||
echo -n
|
||||
else # Otherwise add
|
||||
@@ -182,4 +182,3 @@ getline LINE 50
|
||||
getline LINE 50
|
||||
restore
|
||||
|
||||
echo "<$LINE>"
|
||||
|
||||
Reference in New Issue
Block a user