macOS 10.15 comes with a very old version of the diff command. I've read in https://unix.stackexchange.com/a/338960/80391 that version 3.4 contains the --color
argument.
How can I update the version on macOS so that I can use this newer feature?
macOS 10.15 comes with a very old version of the diff command. I've read in https://unix.stackexchange.com/a/338960/80391 that version 3.4 contains the --color
argument.
How can I update the version on macOS so that I can use this newer feature?
Since macOS does not include a package manager, you have to install one if you want newer versions of the tools that come with the OS. The most popular one these days is Homebrew. Macports is a similar project.
After installing Homebrew, you can install a newer version of diff
by installing the diffutils
package:
brew install diffutils
Of course you can also build everything from source, but using a package manager is easier.