3 ms·
tcsh on my system: $ tcsh --version tcsh 6.21.00 (Astron) 2019-05-08 (x86_64-apple-darwin) options wide,nls,dl,bye,al,kan,sm,rh,color,filec $ tcsh
by eddieh 5y ago
tcsh on my system:
$ tcsh --version
tcsh 6.21.00 (Astron) 2019-05-08 (x86_64-apple-darwin) options wide,nls,dl,bye,al,kan,sm,rh,color,filec
$ tcsh
% command -v command
command
% command -V command
command is a shell builtin
% builtins | grep command
%
- guerrilla 5y agoSomeone should make this into a blog post at this point :P
- pxc 5y agoYeah, this is probably because macOS has done something very, very weird, and added an executable `/usr/bin/command` to the system. These are the contents on the old MacBook I have for work right here: #!/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+"$@"} If you have SIP disabled, try renaming `/usr/bin/command` to `/usr/bin/command.wtf` and see if `tcsh` still acts like there's a `command` command.
- eddieh 5y agoI do have SIP disabled for DYLD_LIBRARY_PATH and a handful of other things, but macOS still says /usr/bin/command is on a read-only file system. [edit] Not hard to remount root as writable $ sudo mount -uw / Password: $ sudo mv /usr/bin/command /usr/bin/command.save $ tcsh % command -v command command: Command not found. % command -V command command: Command not found. % Now reversing the changes % exit exit $ sudo mv /usr/bin/command.save /usr/bin/command $ sudo mount -ur / mount_apfs: volume could not be mounted: Invalid argument mount: / failed with 66 Looks like I'll have to reboot to get the read-only state back.