Mail Archives: djgpp-workers/1999/04/06/07:43:29
> 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'.
Ah, that's even cheaper, I suppose.
> 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 */?
Uh, no, sorry. I just encountered this behaviour and recaptured things from
memory.
> Does anybody know if the Bash behavior specific to Bash, or
> other Unix shells return directories for */?
I don't...
> > DOS also returns files for *.*\, IIRC.
> DOS ignores trailing slashes entirely.
Ah, great. So my memory served ok.
> > 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.
If someone wants to fix the behaviour, please do. If not, I will update the
docs as soon as I have time...
> > Also, I 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.
DOS 7.10 without Win98 GUI (LFN=n), so only single case filenames exist. In
this case, just `abc' (or `ABC', same to DOS). I used echo from Shellutils
to expand the pattern. FNCASE... I do not have that variable in my
environment.
Groente, Michel.
- Raw text -