4 ms·
True! Also the mixing of upper and lower-case directories on ~ is a red flag. Offtopic, but this kind of one-line conditions are typically best written as
by enriquto 7y ago
True! Also the mixing of upper and lower-case directories on ~ is a red flag.
Offtopic, but this kind of one-line conditions are typically best written as
test -d ~/dev/go && export GOPATH=~/dev/go
then it is easier tho change the sign of the condition (by using either || or &&)
- toxik 7y agoA "red flag" for what? He's using macOS, in which the typical user-facing directories are propercase (/Users, ~/Documents, etc.)
- enriquto 7y agoI don't know, it's just very ugly and it lacks a sense of aesthetics (just like everything else on macos, so at least it is consistent). It's like reading a book that uses three different fonts on each page. You just cannot take it seriously.
- shrimp_emoji 7y agoletter cases were a mistake in language itself. cool way to bloat your glyph set to double the size and introduce aesthetic and string matching problems.
- laumars 7y agoRelated fact: the term "case" dates back to the old printing presses where characters would be individual blocks or wood or metal and they were stored in draws. Capital letters were stored in the draw above non-capital letters -- hence why they are referred to as "upper case" and "lower case". In terms of your general point, upper and lower case letters were originally different stylistic type-faces rather than "modes" of a letter in the same type-face. It wasn't until relatively recently in our writing history that the rules of capital letters became defined rather than a style choice and I'm certain they weren't thinking much about the problems that might cause with string matching on digital systems invented several hundred years later.
- siffland 7y agoI dislike CaMelcAse as well, but to each his own, I have stuff backed up from my windows machine on my BSD machine that has spaces and uppercase i leave it in case i need to restore. It does not mean you cannot take it seriously. MacOS is one of the few registered UNIX systems out there (https://en.wikipedia.org/wiki/Single_UNIX_Specification#macOS https://en.wikipedia.org/wiki/Single_UNIX_Specification#macO...). I actually do not own a Mac, but it is a decent OS and performs well and tries to be windows friendly (hence camelcase and spaces) and tries to be stable and secure.
- andrepd 7y agoAren't you being a little over-dramatic? I use Uppercase directories (Documents, Downloads, Development) in my ~ as well, in a consistent manner. Why is that ugly?
- toxik 7y agoI guess the downvotes tell you how other hackers feel about your opinions.
- sneak 7y agoFile systems on macOS are case insensitive. The system-provided directories are capitalized by convention, but you may also refer to them in lowercase if you like. It’s no more a “red flag” than `c:\WINDOWS` being capitalized. I opt for the if-brackets rather than the one line syntax because it is clearer to read. “if this, then that” is less mental effort than remembering just how boolean operators short circuit, for me at least. It's a few extra lines but I prefer the layout, indent, and ease of scanning.
- saagarjha 7y ago> File systems on macOS are case insensitive. Not all of them. You can choose to have a case-sensitive filesystem if you’d like.
- sneak 7y agoAs of about five years ago, enabling that feature at mkfs time broke tons of apps that assume case insensitivity. Not sure if the situation has improved.
- ImprovedSilence 7y ago> File systems on macOS are case insensitive. Holy smacks, all these years and I never knew that! Too bad auto-complete doesn't pick up on it though.
- xyzzy99 7y agoIt can. Try: set completion-ignore-case on (for bash).
- flukus 7y agoWindows now has optional case sensitivity on a per directory level. Drove me crazy trying to work out errors in an old c# codebase after a git checkout in wsl, multiple rounds of screaming THE FILES RIGHT THERE!
- yesenadam 7y ago