I just 'updated' the great PNG Optimizer by @Tom
I had to re-install a couple 'parts' of it. While doing so, something got broken under the hood. I'm not strong with shell script stuff etc etc, any help would be appreciated.
The new path (from my post above) means that the KM shell now first looks into /usr/local/bin (that’s where most of the user-installed binaries are located), and then into /usr/bin (where for example defaults is located, and other standard binaries).
And then the remaining paths, of course.
The order is important for cases where you have two different versions of the same program installed. For example the standard version that comes with macOS (in /usr/bin or /bin), and a newer version you installed yourself (usually in /usr/local/bin).
With the order as above the shell uses the version in /usr/local/bin, which normally is what you want.