diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Src/pattern.c | 11 |
2 files changed, 14 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index b4efdf880..d47d8ceba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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: diff --git a/Src/pattern.c b/Src/pattern.c index 1f0a87561..264144382 100644 --- a/Src/pattern.c +++ b/Src/pattern.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++) |