4

I have a cool looking (at least for me) prompt for my bash shell. This mean that tramp hangs if I try to use sudo to open a file because my prompt looks like something unexpected to tramp. And I really don't like to deal with regexp.

So, I was wondering how can I reset the prompt of my machine before using tramp!

6

You could change the .bashrc such that it doesn't modify the prompt when the TERM variable is set to "dumb".

if test $TERM = "dumb"
   # leave the prompt alone
else
   # set up fancy prompt
end

According to the manual TERM is governed by tramp-terminal-type, which defaults to dumb.

3
  • I think that this is the best solution possible short of fixing dumb terminals in general. Not only will it fix it with tramp, but also other dumb terminals. – J David Smith Oct 28 '14 at 13:07
  • Thanks for the answer, rekado, but how I tell Tramp to set the $TERM variable before doing anything? – shackra Oct 29 '14 at 1:26
  • 1
    @JorgeArayaNavarro according to the manual TERM is governed by tramp-terminal-type, which defaults to dumb. – rekado Oct 29 '14 at 6:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.