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:13:16 -0800 (PST)

Fabian Ezequiel Gallina <address@hidden> writes:

  > 2009/12/22 Dan Nicolaescu <address@hidden>:
  > > Fabian Ezequiel Gallina <address@hidden> writes:
  > >
  > >  > In emacs 23.1 when I use M-x term the prompt is rendered correctly to
  > >  > whatever is defined on the PS1 environment variable. But in 23.1.90.1 
it
  > >  > prompts whatever is defined in the PS1 but also before that, it prompts
  > >  > 0;<user>@<host>:<location>.
  > >  >
  > >  > The steps to reproduce it are quite simple:
  > >  >
  > >  > emacs -Q
  > >  > M-x term
  > >  >
  > >  > The prompt is rendered like this:
  > >  >
  > >  > 0;address@hidden:~/Builds/address@hidden emacs]$
  > >  >
  > >  > Since my PS1 is set to
  > >  >
  > >  > PS1='address@hidden \W]\$ '
  > >  >
  > >  > the expected result is:
  > >  >
  > >  > address@hidden emacs]$
  > >
  > > I can't reproduce this.
  > > Are you sure that your prompt is set to what you show there?  Maybe the
  > > system default sets it to something else?
  > >
  > 
  > 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.

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"

  > 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.






reply via email to

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