mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-08-22 18:41:00 +02:00
fix for (z) flag, don't take # as comment (12228)
This commit is contained in:
parent
cc2213b340
commit
d861bb9805
3 changed files with 10 additions and 4 deletions
|
@ -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>
|
2000-07-12 Peter Stephenson <pws@cambridgesiliconradio.com>
|
||||||
|
|
||||||
* 12227: Completion/Core/compinstall: add select-prompt handling
|
* 12227: Completion/Core/compinstall: add select-prompt handling
|
||||||
|
|
|
@ -2058,15 +2058,15 @@ mod_export LinkList
|
||||||
bufferwords(LinkList list, char *buf, int *index)
|
bufferwords(LinkList list, char *buf, int *index)
|
||||||
{
|
{
|
||||||
int num = 0, cur = -1, got = 0, ne = noerrs, ocs = cs;
|
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;
|
char *p;
|
||||||
|
|
||||||
if (!list)
|
if (!list)
|
||||||
list = newlinklist();
|
list = newlinklist();
|
||||||
|
|
||||||
zleparse = 1;
|
zleparse = 3;
|
||||||
addedx = 0;
|
addedx = 0;
|
||||||
noerrs = 1;
|
noerrs = expanding = 1;
|
||||||
lexsave();
|
lexsave();
|
||||||
if (buf) {
|
if (buf) {
|
||||||
int l = strlen(buf);
|
int l = strlen(buf);
|
||||||
|
@ -2133,6 +2133,7 @@ bufferwords(LinkList list, char *buf, int *index)
|
||||||
inpop();
|
inpop();
|
||||||
errflag = 0;
|
errflag = 0;
|
||||||
zleparse = ozp;
|
zleparse = ozp;
|
||||||
|
expanding = oexp;
|
||||||
noerrs = ne;
|
noerrs = ne;
|
||||||
lexrestore();
|
lexrestore();
|
||||||
cs = ocs;
|
cs = ocs;
|
||||||
|
|
|
@ -673,7 +673,7 @@ gettok(void)
|
||||||
/* chars in initial position in word */
|
/* chars in initial position in word */
|
||||||
|
|
||||||
if (c == hashchar &&
|
if (c == hashchar &&
|
||||||
(isset(INTERACTIVECOMMENTS) ||
|
((zleparse != 3 && isset(INTERACTIVECOMMENTS)) ||
|
||||||
(!zleparse && !expanding &&
|
(!zleparse && !expanding &&
|
||||||
(!interact || unset(SHINSTDIN) || strin)))) {
|
(!interact || unset(SHINSTDIN) || strin)))) {
|
||||||
/* History is handled here to prevent extra *
|
/* History is handled here to prevent extra *
|
||||||
|
|
Loading…
Reference in a new issue