Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

emacs tramp how to avoid bash_profile

Tags:

emacs

tramp

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)

like image 820
Rodrigo Amestica Avatar asked Oct 15 '25 00:10

Rodrigo Amestica


1 Answers

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.


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!