I did this:
ssh me@remote which hg
returned nothing presumably because it couldn't find hg.
So then I did this:
ssh me@remote echo $PATH
which returned this long mess: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/texbin:/opt/bin
Then I did this:
ssh me@remote
<after getting logged in to the remote computer>
which hg
/opt/bin/hg
Why would the server be able to find the hg binary in one instance, but not in both? What do you have to do to fix it so the
ssh me@remote which hg
works?
ssh me@remote echo $(which hg), although I don't know why it wouldn't work the other way. Andwhichshould complain if it doesn't find the program, so it's probably not a problem withPATHnot being set. - oogassh me@remove bash -c "which hg"(or whichever shell you want). - ooga