summaryrefslogtreecommitdiff
path: root/Src/lex.c
diff options
context:
space:
mode:
authorFrank Terbeck <ft@bewatermyfriend.org>2011-06-02 10:50:35 +0200
committerFrank Terbeck <ft@bewatermyfriend.org>2011-06-02 10:50:35 +0200
commit2438a0e95aa448f0aeda468752444306b44fe7d0 (patch)
tree8477e9c6af360f6a89af13e8cb5f2a4f9c1cff2c /Src/lex.c
parentb495ba1e5a3ab1396844490ad8cad17dec23d6c1 (diff)
parent21266db1d9ae433bf1dcb196a4e258c00541b599 (diff)
downloadzsh-2438a0e95aa448f0aeda468752444306b44fe7d0.tar.gz
zsh-2438a0e95aa448f0aeda468752444306b44fe7d0.zip
Merge commit 'zsh-4.3.12' into debian
Diffstat (limited to 'Src/lex.c')
-rw-r--r--Src/lex.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/Src/lex.c b/Src/lex.c
index 2988b41cb..fdd05efff 100644
--- a/Src/lex.c
+++ b/Src/lex.c
@@ -877,7 +877,7 @@ gettok(void)
dbparens = 1;
return DINPAR;
}
- if (incmdpos) {
+ if (incmdpos || (isset(SHGLOB) && !isset(KSHGLOB))) {
len = 0;
bptr = tokstr = (char *) hcalloc(bsiz = 32);
switch (cmd_or_math(CS_MATH)) {
@@ -1141,6 +1141,8 @@ gettokstr(int c, int sub)
break;
if (incasepat && !len)
return INPAR;
+ if (!isset(KSHGLOB) && len)
+ goto brk;
}
if (!in_brace_param) {
if (!sub) {
@@ -1753,7 +1755,7 @@ parse_subst_string(char *s)
* additional memory should come off the heap or
* otherwise. So we cheat by copying the unquoted string
* into place, unless it's too long. That's not the
- * normal case, but I'm worried there are are pathological
+ * normal case, but I'm worried there are pathological
* cases with converting metafied multibyte strings.
* If someone can prove there aren't I will be very happy.
*/
@@ -1823,7 +1825,7 @@ exalias(void)
int zp = lexflags;
gotword();
- if (zp == 1 && !lexflags) {
+ if ((zp & LEXFLAGS_ZLE) && !lexflags) {
if (zshlextext == copy)
zshlextext = tokstr;
return 0;