diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-07-13 08:42:10 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-07-13 08:42:10 +0000 |
commit | c3082d546e19df8fa70f179e1151c6b742ba5388 (patch) | |
tree | e598b63d43686f1b06bf12346924a8df930d8a88 /Src/hist.c | |
parent | 6ef0d9767fc86b39c17bc29ec633dfb07baadd6e (diff) | |
download | zsh-c3082d546e19df8fa70f179e1151c6b742ba5388.tar.gz zsh-c3082d546e19df8fa70f179e1151c6b742ba5388.tar.xz zsh-c3082d546e19df8fa70f179e1151c6b742ba5388.zip |
slightly improved (z) flag for parsing conditions; recognising glob flags in conditions still doesn't work (12237)
Diffstat (limited to 'Src/hist.c')
-rw-r--r-- | Src/hist.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Src/hist.c b/Src/hist.c index 35ab2b1fd..4a7a0fa58 100644 --- a/Src/hist.c +++ b/Src/hist.c @@ -2057,16 +2057,16 @@ unlockhistfile(char *fn) mod_export LinkList bufferwords(LinkList list, char *buf, int *index) { - int num = 0, cur = -1, got = 0, ne = noerrs, ocs = cs; - int owb = wb, owe = we, oadx = addedx, ozp = zleparse, oexp = expanding; + int num = 0, cur = -1, got = 0, ne = noerrs, ocs = cs, oll = ll; + int owb = wb, owe = we, oadx = addedx, ozp = zleparse, onc = nocomments; char *p; if (!list) list = newlinklist(); - zleparse = 3; + zleparse = 1; addedx = 0; - noerrs = expanding = 1; + noerrs = 1; lexsave(); if (buf) { int l = strlen(buf); @@ -2076,7 +2076,8 @@ bufferwords(LinkList list, char *buf, int *index) p[l] = ' '; p[l + 1] = '\0'; inpush(p, 0, NULL); - cs = 0; + cs = strlen(p) + 1; + nocomments = 1; } else if (!isfirstln && chline) { p = (char *) zhalloc(hptr - chline + ll + 2); memcpy(p, chline, hptr - chline); @@ -2092,6 +2093,7 @@ bufferwords(LinkList list, char *buf, int *index) p[ll + 1] = '\0'; inpush(p, 0, NULL); } + ll = strlen(p); if (cs) cs--; strinbeg(0); @@ -2133,10 +2135,11 @@ bufferwords(LinkList list, char *buf, int *index) inpop(); errflag = 0; zleparse = ozp; - expanding = oexp; + nocomments = onc; noerrs = ne; lexrestore(); cs = ocs; + ll = oll; wb = owb; we = owe; addedx = oadx; |