4 ms·
If you are manually typing a command, then the shell could do this work instead of the file system, right? That's what the shell is for, to be the bridge betwee
by greiskul 5y ago
If you are manually typing a command, then the shell could do this work instead of the file system, right? That's what the shell is for, to be the bridge between humans and the computer right.
In a perfect system, you would type ls /p, and one of the suggestions of the tab completion would be /Program.
- bayindirh 5y agoBash normally doesn't do that, but there are a lot of options available for both Bash and ZSH, which can do much more than just "case insensitive matching".
- yjftsjthsd-h 5y agoSpecifically: For bash, `set completion-ignore-case on` in ~/.inputrc, for zsh ... I have `zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'`, which seems too complicated but that's what's in my zshrc.
- galaxyLogic 5y agoYou are right. Imagine that you had a fancy speech-recognition interface to your system. When you pronounce the name of a command, there's no difference whether you pronounce it uppercase or lowercase. Also imagine having two files in the same directory which differ only by case. What would be the benefit of being able to have two or more such files? Are there any use-cases for which case-sensitive file-system is better than case-insensitive one?
- bayindirh 5y agoHowever, the pronunciation of the actual body text will trigger some words to be upper case, so there's definitely a meaning under that capitalized letters. Actually, not having the exact file may not provide a utility for you, or most of us, but searching for a file in a case sensitive manner, and getting ENOTFOUND just because it doesn't present in the way I searched is valuable from my point of view. Also, having a case-sensitive system is simpler from technical point of view, and prone to less bugs. This is especially true after UTF-8 become ubiquitous. Searching for an exact byte stream is much more simpler than a country dependent, exceptions filled search/match algorithm.