Initial devel branch import from bash-3.0-alpha

This commit is contained in:
Chet Ramey
2011-11-28 14:41:26 -05:00
parent 7117c2d221
commit d3a24ed242
261 changed files with 24280 additions and 6327 deletions
+3 -4
View File
@@ -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>"