Ben Finney wrote:
Your heuristics seem to assume there will only ever be a maximum of one
match, which is false. I present the following example:
$ ls foo/
bAr.dat BaR.dat bar.DAT
There should perhaps be an extra step at the beginning:
0) Test whether the specified path refers
Greg Ewing writes:
> Maybe we could use a heuristic such as:
Your heuristics seem to assume there will only ever be a maximum of one
match, which is false. I present the following example:
$ ls foo/
bAr.dat BaR.dat bar.DAT
> 1) Search the directory for an exact match to the name