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

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

Re: Problems with ANSI colors in shell mode in Emacs 21.2.95.


From: Lute Kamstra
Subject: Re: Problems with ANSI colors in shell mode in Emacs 21.2.95.
Date: Mon, 10 Feb 2003 16:33:48 +0100
User-agent: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.2.95

Francesco Potorti` <address@hidden> writes:

> >I've defined a prompt for bash like this.
> >
> >,----[ .bashrc ]
> >|     
> >PS1="\[\033[1;34m\][\[\033[1;31m\]\s-\v\[\033[1;34m\]|\[\033[1;31m\]\h\[\033[1;34m\]|\[\033[1;31m\]\W\[\033[1;34m\]]>\[\033[0m\]
> > "
> >`----
>
> I do not know why you put all those \[ and \] in there.  

,----[ man bash; PROMPTING ]
|               \[     begin a sequence of non-printing characters,
|                      which could be used to embed a terminal conĀ­
|                      trol sequence into the prompt
|               \]     end a sequence of non-printing characters
`----

> I tried to remove all of them and I got a working prompt, like this:
>
> PS1="\033[1;34m[\033[1;31m\s-\v\033[1;34m|\033[1;31m\h\033[1;34m|\033[1;31m\W\033[1;34m]>\033[0m
>  "
>
> Can you confirm this?

This indeed works in the shell mode of Emacs 21.2.95.  However, things
go terribly wrong when I use this setting for PS1 in combination with
xterm (XFree86 4.0.1h(149)) or gnome-terminal (1.2.4).  For example,
the cursor is not positioned at the end of the prompt anymore.

Regards,

  Lute.

-- 
Lute Kamstra  <address@hidden>
CWI  department PNA4
Room M233  phone (+31) 20 592 4214
[Echelon material: CIDA president NSA]




reply via email to

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