I've created a shell script wrapping ssh to change my terminal background when connecting to a server following one of the many examples on this site and stackexchange.
11:22 ~ $ echo $PATH /opt/local/bin:/opt/local/sbin:/Volumes/Macintosh HD/Users/robertson/bin/android-sdk-macosx/platforms:/Volumes/Macintosh HD/Users/robertson/bin/android-sdk-macosx/tools:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/git/bin 11:22 ~ $ which ssh /usr/local/bin/ssh 11:22 ~ $ whereis ssh /usr/bin/ssh
As you can see, which ssh does correctly find the script I placed in /usr/local/bin, however whereis ssh does not, and when I run
ssh [email protected], I still get the system ssh without executing my wrapper. I'm forced to call it directly via
/usr/local/bin/ssh [email protected] to get the color change.
Any idea what's missing here?