emacs tramp how to avoid bash_profile

922 Views Asked by At

Every time I'm visiting a file system in remote machine and I execute a command (e.g. grep) the emacs buffer with the result of that command also contains my verbose .bash_profile output.

How could I disable this behavior? That is, how to make the remote command only load .bashrc? (In tramp my remote method is ssh)

1

There are 1 best solutions below

1
On

I suggest to move everything in your .bash_profile that outputs text to the end of the file and put the following before these commands:

If [ "$TERM" == "dumb" ]; then
     return
fi

That should do it. Reread http://www.gnu.org/software/tramp/#Remote-shell-setup for more information.