0
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?
I made a work-around by adding the following line to ~/.profile
alias nano='/opt/local/bin/nano'
The real question is, why do you have two executable files with the same name in directories both of which are in your
PATH
variable? Remove or rename one of thenano
files tonano.bak
, and if you still need the binary in both locations, create a symbolic link to the remaining binary. – Breakthrough – 2012-11-04T14:12:15.983