bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#5255: 23.1.90; Wrong prompt in term


From: Dan Nicolaescu
Subject: bug#5255: 23.1.90; Wrong prompt in term
Date: Tue, 22 Dec 2009 07:44:50 -0800 (PST)

Fabian Ezequiel Gallina <address@hidden> writes:

  > 2009/12/22 Dan Nicolaescu <address@hidden>:
  > >  >
  > >  > I guess I found the problem:
  > >  >
  > >  > address@hidden lisp]$ env | grep PROMPT_COMMAND
  > >  > PROMPT_COMMAND=echo -ne "\033]0;address@hidden:${PWD/$HOME/~}\007"
  > >
  > > That looks like a bad idea.
  > > I am guessing that you are trying to set the xterm title to display the
  > > current directory in the shell, this uses an xterm specific escape 
sequence.
  > > So it should only be done for xterm.
  > >
  > 
  > Yes, it is used just for that, I found this which explains the thing:
  > http://www.faqs.org/docs/Linux-mini/Xterm-Title.html#ss3.1

The explanation is not very clear, it actually shows how this can be
done by using just PS1 and not PROMPT_COMMAND...
And it's shown that is should only happen when TERM is xterm.

  > > But you should not need to use PROMPT_COMMAND to do this, it can be done
  > > by just setting the prompt, search the web for something like: "bash
  > > prompt xterm title"
  > >
  > 
  > I didn't set up it myself, I guess xterm sets this automatically.

xterm does not do things like that.
Your system does it then, and it's wrong, it should only do it if TERM
is xterm.

  > 
  > >  > Now the thing is that executing this in a normal terminal renders
  > >  > nothing, as opposed to term. My guess would be that term is missing
  > >  > the \033] escape sequence.
  > >
  > > It's actually \033];STUFF\007.
  > >
  > 
  > Oh yes, actually that is not being taken into account and I guess it
  > should, at least that's what happens in emacs 23.1.

This is an xterm specific escape sequence, most likely due to a bad
setup, you'll get the same problem if you use a vt100 terminal for
example.  
So this is not a term.el problem.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]