weird resolving of path to command
- by Eldamir
I have the terminal editor 'nano' installed in two places on my mac
/usr/bin/nano
/opt/local/bin/nano
The installations are of different versions. the one in /usr does not support my configuration in ~/.nanorc and the one in /opt does.
when i open a file with the command 'nano file', errors are displayed, indicating that the one in /usr was used, however, if i run 'which nano'; the one in /opt shows up.
Isn't 'which' meant to search the path for the default? And why wouldn't a call to 'nano' resolve to the same path?
EDIT: I made a work-around by adding the following line to ~/.profile
alias nano='/opt/local/bin/nano'