Mail Archives: djgpp-workers/1999/04/06/07:14:37
On Tue, 6 Apr 1999, Michel de Ruiter wrote:
> An argument of `*/' matches directories *and* normal files.
> An argument of `*/' _in Bash_ does *not* match normal files, only
> directories.
>
> I think this difference exists, because the DJGPP command line matching
> routines do not want to stat every filename to see if it is a directory or
> not, because that would mean the minimum executable size would increase too
> much.
The globbing code cannot call `stat' at all, because it's non-ANSI, and the
globbing code is linked into every executable, so it would pollute the
ANSI namespace. But we can look at the attributes returned by `findfirst'.
Did you look at the code that expands wildcards, and if so, can you
suggest a change that will only return directories in the case of */?
Does anybody know if the Bash behavior specific to Bash, or other Unix
shells return directories for */?
> DOS also returns files for *.*\, IIRC.
DOS ignores trailing slashes entirely.
> Maybe we should document this somewhere, though. Where?
In the same place where the wildcard expansion is documented. `glob's
Info page seems like a good place.
> Also, is noticed `abC*' expands to `ABC', whereas `aBc*' expands to `abc'.
> Why?
I cannot reproduce this behavior. Please tell whether this was on DOS or
Windows 9X, which files that match these patterns exist, and how did you
expand them (with what program?). The setting of FNCASE in the
environment is also an important information.
- Raw text -