3 ms·
> If /usr/bin is on a case-insensitive filesystem, and you execvp("CD", ...) That seems like fairly rare edge case, considering that UNIX typically had case-se
by zokier 9y ago
> If /usr/bin is on a case-insensitive filesystem, and you execvp("CD", ...)
That seems like fairly rare edge case, considering that UNIX typically had case-sensitive file-systems, or rather handled filenames as opaque blobs. I wonder what actual system caused the need for case folding? Maybe HFS?
- LukeShu 9y agoThe `tr` bit isn't actually in the FreeBSD version of the script[1], so I'm assuming it's a macOS HFS thing. https://github.com/freebsd/freebsd/blob/master/usr.bin/alias/generic.sh https://github.com/freebsd/freebsd/blob/master/usr.bin/alias...
- kbob 9y agoMac filesystems case-fold by default, so the script could be invoked as cd, CD, Cd, or CD. Only the lowercase cd is shadowed by the builtin.