2019-06-12 11:17:02 +0200, Joerg Schilling:
[...]
> But you finally conviced me to use "set -o globskipdot" as the new default.
[...]

Thanks for that.

> > But here, that's not even the case as you're synthesizing "." and
> > ".." when it's off which is a change of behaviour from the old
> > behaviour.
> 
> The reason for synthesizing the entries is backwards compatibility to 
> historic 
> filesystems and to permit people that expect the historic behavior from the 
> 1970s to be used in their code.
> 
> When I wrote WOFS in 1990 (the first filesystem that does not have . and ..), 

Thanks.

On the history front, a few more notes I didn't add to the
original bugs:

The globs of the sh of Research Unix 8th edition (1984) was
excluding "." and ".." and was not treating other dot files
specially (both echo * and echo .* would include .foo, but
neither would include "." and ".."). As was the initial
intention in the first version of Unix.

plan9 seems to go further in that ls also lists every file,
there's no -a/-A there, and no concept of .foo being hidden. I
can't see any . nor .. in the list returned by ls or rc globs
but I've not checked whether that's because there're not there
in the FS layout or removed from whatever kernel or libc API
those use to retrieve the file list.

The plan9port port of plan9 userland to Unix removes the "." and
".." in the API used by rc/ls to retrieve the file list. Byron
Rakitzis's rewrite of rc does treat dot-files specially in its
globs, and currently doesn't exclude . and .. (I'm planning to
submit a patch for that one). For es (based on that one), you
can choose at compile time between the two rc behaviours.

-- 
Stephane

Reply via email to