diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-07-12 10:31:29 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-07-12 10:31:29 +0000 |
commit | d861bb98059da21d90b966c6bd24bf60a91fdec8 (patch) | |
tree | 416009865da5fa27077c83dba60c8e0b7bfe0c3c | |
parent | cc2213b340690590cdd1f7094cfaaf83a90a7cda (diff) | |
download | zsh-d861bb98059da21d90b966c6bd24bf60a91fdec8.tar.gz zsh-d861bb98059da21d90b966c6bd24bf60a91fdec8.tar.xz zsh-d861bb98059da21d90b966c6bd24bf60a91fdec8.zip |
fix for (z) flag, don't take # as comment (12228)
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/hist.c | 7 | ||||
-rw-r--r-- | Src/lex.c | 2 |
3 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog index 0f438af11..41619f3b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2000-07-12 Sven Wischnowsky <wischnow@zsh.org> + + * 12228: Src/hist.c, Src/lex.c: fix for (z) flag, don't take # as + comment + 2000-07-12 Peter Stephenson <pws@cambridgesiliconradio.com> * 12227: Completion/Core/compinstall: add select-prompt handling diff --git a/Src/hist.c b/Src/hist.c index beecfbe4a..35ab2b1fd 100644 --- a/Src/hist.c +++ b/Src/hist.c @@ -2058,15 +2058,15 @@ 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; + int owb = wb, owe = we, oadx = addedx, ozp = zleparse, oexp = expanding; char *p; if (!list) list = newlinklist(); - zleparse = 1; + zleparse = 3; addedx = 0; - noerrs = 1; + noerrs = expanding = 1; lexsave(); if (buf) { int l = strlen(buf); @@ -2133,6 +2133,7 @@ bufferwords(LinkList list, char *buf, int *index) inpop(); errflag = 0; zleparse = ozp; + expanding = oexp; noerrs = ne; lexrestore(); cs = ocs; diff --git a/Src/lex.c b/Src/lex.c index 644f8cf2b..5aa63ece5 100644 --- a/Src/lex.c +++ b/Src/lex.c @@ -673,7 +673,7 @@ gettok(void) /* chars in initial position in word */ if (c == hashchar && - (isset(INTERACTIVECOMMENTS) || + ((zleparse != 3 && isset(INTERACTIVECOMMENTS)) || (!zleparse && !expanding && (!interact || unset(SHINSTDIN) || strin)))) { /* History is handled here to prevent extra * |