mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-02 22:11:54 +02:00
18263: fix saving of glob state so that globs can be used from (e) glob qual
This commit is contained in:
parent
cd220acea0
commit
945f54b001
2 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2003-02-20 Oliver Kiddle <opk@zsh.org>
|
||||
|
||||
* 18263: Src/glob.c: fix saving of glob state so that globs can
|
||||
be used from the (e) glob qualifier
|
||||
|
||||
2003-02-19 Oliver Kiddle <opk@zsh.org>
|
||||
|
||||
* 18262: Completion/Base/Utility/_multi_parts: fix bug where only
|
||||
|
|
|
@ -181,9 +181,9 @@ static struct globdata curglobdata;
|
|||
(N).gd_pathpos = pathpos; \
|
||||
(N).gd_pathbuf = pathbuf; \
|
||||
(N).gd_pathbufsz = 0; \
|
||||
(N).gd_pathbuf = NULL; \
|
||||
(N).gd_glob_pre = glob_pre; \
|
||||
(N).gd_glob_suf = glob_suf; \
|
||||
pathbuf = NULL; \
|
||||
} while (0)
|
||||
|
||||
#define restore_globstate(N) \
|
||||
|
@ -234,7 +234,7 @@ addpath(char *s)
|
|||
}
|
||||
|
||||
/* stat the filename s appended to pathbuf. l should be true for lstat, *
|
||||
* false for stat. If st is NULL, the file is only chechked for existance. *
|
||||
* false for stat. If st is NULL, the file is only checked for existance. *
|
||||
* s == "" is treated as s == ".". This is necessary since on most systems *
|
||||
* foo/ can be used to reference a non-directory foo. Returns nonzero if *
|
||||
* the file does not exists. */
|
||||
|
@ -1580,6 +1580,7 @@ zglob(LinkList list, LinkNode np, int nountok)
|
|||
} else if (isset(NOMATCH)) {
|
||||
zerr("no matches found: %s", ostr, 0);
|
||||
free(matchbuf);
|
||||
restore_globstate(saved);
|
||||
return;
|
||||
} else {
|
||||
/* treat as an ordinary string */
|
||||
|
|
Loading…
Reference in a new issue