3 ms·
There are multiple layers at play. For example someone looking a file selection dialog in a gui has at least these layers, lowest level first: - Filesystem im
by rogerbinns 12y ago
There are multiple layers at play. For example someone looking a file selection dialog in a gui has at least these layers, lowest level first:
- Filesystem implementation (actual on disk bytes)
- Filesystem compatibility (adjustments to OS semantics)
- Generic filesystem layer in the kernel
- System call interface (between userland and kernel)
- Userland low level library (eg system call wrappers)
- Higher level libraries (eg libc)
- User interface libraries
- App level modules & libraries
The problem with the filesystem being case insensitive is that is the first level above, where there is virtually no context or user information. That is the hardest place to work out if the user considers Résumé and RESUME to be the same. The lower down the list the easier it gets. The important point is that how you store things and how you present does not need to be the same.
Command line tools typically use the libc level of things. It is perfectly possible to make that level so the system appears case insensitive (another poster mentioned Windows doing that).
Your Unix command line experience is very much affected by your locale. For example the ls command does the following:
- Sorts filenames
- Displays sizes (different locales have different conventions for floating point representation, digit grouping etc)
- Displays times
Environment variables like $LANG, $LC_*, $TZ etc control this in Unix.
Individual programs can also alter behaviour. For example bash can be configured to do case insensitive filename completion.
TLDR: while case insensitivity is a nice user experience for humans, it is awful for the lower layers including filesystems. The closer a program is to a human, the easier it is to give that nice user experience. There is no requirement for a case insensitive user experience to then make filesystems also implement that. And as my examples show, they couldn't do it correctly anyway.
- woodman 12y agoDon't forget the additional fun that terminal emulators add in the journey from libc to your eyeballs. Some of the most difficult bugs I've worked on involved grep with the color flag and automatic build systems...