4 ms·
TIL that mac has an executable `cd` command: $ cat /usr/bin/cd #!/bin/sh # $FreeBSD: src/usr.bin/alias/generic.sh,v 1.2 2005/10/24 22:32:19 cperci
by davidpfarrell 4y ago
TIL that mac has an executable `cd` command:
$ cat /usr/bin/cd
#!/bin/sh
# $FreeBSD: src/usr.bin/alias/generic.sh,v 1.2 2005/10/24 22:32:19 cperciva
Exp $
# This file is in the public domain.
builtin `echo ${0##*/} | tr \[:upper:] \[:lower:]` ${1+"$@"}
Although it didn't behave as expected when invoked ...
- cperciva 4y agoRequired by POSIX, and it does exactly what it's supposed to do: Changes directory in the process (not the parent shell). This isn't completely useless -- you get an exit status and potentially error messages out. (And yes, I'm the cperciva in that version tag.)
- davidpfarrell 4y ago> And yes, I'm the cperciva in that version tag. Makes my day that you could discover this post - Thanks so much for chiming in !
- simonebrunozzi 4y agoYou never cease to amaze me, Colin. Big fan of yours. Keep rocking.
- deleted 4y ago[deleted]