How do I list commands shadowed by other commands in PATH?
- by sds
How do I list all the commands in my path which are shadowed by other commands?
E.g., if I have /bin/foo, /bin/bar, /usr/local/bar and /usr/bin/foo, I want to see something like
foo in /bin shadows /usr/bin
bar in /bin shadows /usr/local/bin
I guess I can throw together something based on ls and comm, but I would much prefer something out of the box, especially bash-based (it would also be nice if aliases and functions were searched too, but that is not too important).