commit bash-20071018 snapshot

This commit is contained in:
Chet Ramey
2011-12-07 09:14:23 -05:00
parent 3d4e09aa28
commit cc12da027f
4 changed files with 25 additions and 7 deletions
+15
View File
@@ -14963,3 +14963,18 @@ pcomplete.c
instead of the shell metacharacters to split words, so programmable
completion does the same thing readline does internally. Reported
by Vasily Tarasov <vtaras@sw.ru>
10/16
-----
bashline.c
- When completing a command name beginnig with a tilde and containing
escaped specical characters, dequote the filename before prefixing
it to the matches, so the escapes are not quoted again. Reported
by neil@s-z.org
10/17
-----
expr.c
- in readtok(), don't reset lasttp if we've consumed the whitespace
at the end of the expression string. Fixes error message problem
reported by <anmaster@tele2.se>
+7 -3
View File
@@ -1477,9 +1477,12 @@ command_word_completion_function (hint_text, state)
if (*hint_text == '~')
{
int l, tl, vl, dl;
char *rd;
char *rd, *dh;
dh = bash_dequote_filename ((char *)hint_text, 0);
vl = strlen (val);
tl = strlen (hint_text);
tl = strlen (dh);
#if 0
l = vl - hint_len; /* # of chars added */
#else
@@ -1490,8 +1493,9 @@ command_word_completion_function (hint_text, state)
free (rd);
#endif
temp = (char *)xmalloc (l + 2 + tl);
strcpy (temp, hint_text);
strcpy (temp, dh);
strcpy (temp + tl, val + vl - l);
free (dh);
}
else
temp = savestring (val);
+2 -2
View File
@@ -2,7 +2,7 @@ This file is reserved.def, in which the shell reserved words are defined.
It has no direct C file production, but defines builtins for the Bash
builtin help command.
Copyright (C) 1987-2006 Free Software Foundation, Inc.
Copyright (C) 1987-2007 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -21,7 +21,7 @@ with Bash; see the file COPYING. If not, write to the Free Software
Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA.
$BUILTIN for
$SHORT_DOC for NAME [in WORDS ... ;] do COMMANDS; done
$SHORT_DOC for NAME [in WORDS ... ] ; do COMMANDS; done
The `for' loop executes a sequence of commands for each member in a
list of items. If `in WORDS ...;' is not present, then `in "$@"' is
assumed. For each element in WORDS, NAME is set to that element, and
+1 -2
View File
@@ -1032,8 +1032,6 @@ readtok ()
if (c)
cp++;
lasttp = tp = cp - 1;
if (c == '\0')
{
lasttok = curtok;
@@ -1041,6 +1039,7 @@ readtok ()
tp = cp;
return;
}
lasttp = tp = cp - 1;
if (legal_variable_starter (c))
{