mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-11-19 13:33:52 +01:00
19554: make nocaseglob more efficient on Cygwin
This commit is contained in:
parent
2ace0ce4f2
commit
02677cbdd6
@ -1,5 +1,9 @@
|
||||
2004-03-08 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 19554: Src/pattern.c: improve users/7121 by allowing
|
||||
Cygwin not to use pattern matching if only the case-insensitive
|
||||
flag is on.
|
||||
|
||||
* 19553: Index: Src/Zle/complist.c, Src/Zle/zle_hist.c,
|
||||
Src/Zle/zle_keymap.c, Src/Zle/zle_main.c, Src/Zle/zle_misc.c,
|
||||
Src/Zle/zle_move.c, Src/Zle/zle_tricky.c, Src/Zle/zle_vi.c:
|
||||
|
@ -344,7 +344,16 @@ patcompile(char *exp, int inflags, char **endexp)
|
||||
|
||||
if (!(patflags & PAT_ANY)) {
|
||||
/* Look for a really pure string, with no tokens at all. */
|
||||
if (!patglobflags)
|
||||
if (!patglobflags
|
||||
#ifdef __CYGWIN__
|
||||
/*
|
||||
* If the OS treats files case-insensitively and we
|
||||
* are looking at files, we don't need to use pattern
|
||||
* matching to find the file.
|
||||
*/
|
||||
|| (!(patglobflags & ~GF_IGNCASE) && (patflags & PAT_FILE))
|
||||
#endif
|
||||
)
|
||||
for (strp = exp; *strp &&
|
||||
(!(patflags & PAT_FILE) || *strp != '/') && !itok(*strp);
|
||||
strp++)
|
||||
|
Loading…
Reference in New Issue
Block a user