Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Glob qualifier close parenthesis tidy up
- X-seq: zsh-workers 3808
- From: Peter Stephenson <pws@xxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx (Zsh hackers list)
- Subject: Glob qualifier close parenthesis tidy up
- Date: Thu, 19 Mar 1998 15:32:48 +0100
This fixes
% print foo(:g/o/a)
fa?o
^ 8-bit squiggle
which is actually two bugs: first, the `)' was included; second, the
tokens in the expression weren't removed.
Without my kshglob patch you will have to apply some of this by hand,
which shouldn't be a major cause of woe in this case.
*** Src/glob.c.cpar Fri Feb 6 11:23:02 1998
--- Src/glob.c Thu Mar 19 15:21:24 1998
***************
*** 864,869 ****
--- 864,871 ----
}
if (*str == ':' && str[-1] == Inpar) {
str[-1] = '\0';
+ str[strlen(str)-1] = '\0';
+ untokenize(str);
modify((char **) &getdata(np), &str);
return;
}
***************
*** 896,905 ****
break;
if (*s == Inpar && (!isset(KSHGLOB) || (s > str && s[-1] == '-'))) {
/* Real qualifiers found. */
if (isset(KSHGLOB))
s[-1] = '\0';
*s++ = '\0';
! while (*s != Outpar && !colonmod) {
func = (int (*) _((Statptr, long)))0;
if (idigit(*s)) {
/* Store numeric argument for qualifier */
--- 898,908 ----
break;
if (*s == Inpar && (!isset(KSHGLOB) || (s > str && s[-1] == '-'))) {
/* Real qualifiers found. */
+ str[sl-1] = '\0';
if (isset(KSHGLOB))
s[-1] = '\0';
*s++ = '\0';
! while (*s && !colonmod) {
func = (int (*) _((Statptr, long)))0;
if (idigit(*s)) {
/* Store numeric argument for qualifier */
***************
*** 925,930 ****
--- 928,934 ----
/* Remaining arguments are history-type *
* colon substitutions, handled separately. */
colonmod = s - 1;
+ untokenize(colonmod);
break;
case Hat:
case '^':
***************
*** 1086,1092 ****
zerr("unknown user", NULL, 0);
data = 0;
}
! if ((*tt = sav) != Outpar)
s = tt + 1;
else
s = tt;
--- 1090,1096 ----
zerr("unknown user", NULL, 0);
data = 0;
}
! if ((*tt = sav))
s = tt + 1;
else
s = tt;
***************
*** 1119,1125 ****
zerr("unknown group", NULL, 0);
data = 0;
}
! if ((*tt = sav) != Outpar)
s = tt + 1;
else
s = tt;
--- 1123,1129 ----
zerr("unknown group", NULL, 0);
data = 0;
}
! if ((*tt = sav))
s = tt + 1;
else
s = tt;
--
Peter Stephenson <pws@xxxxxx> Tel: +39 50 844536
WWW: http://www.ifh.de/~pws/
Gruppo Teorico, Dipartimento di Fisica
Piazza Torricelli 2, 56100 Pisa, Italy
Messages sorted by:
Reverse Date,
Date,
Thread,
Author