[Top][All Lists]
[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]
- Re: Problems with ANSI colors in shell mode in Emacs 21.2.95., (continued)
- Re: Problems with ANSI colors in shell mode in Emacs 21.2.95., Kim F. Storm, 2003/02/11
- Re: Problems with ANSI colors in shell mode in Emacs 21.2.95., Richard Stallman, 2003/02/12
- Re: Problems with ANSI colors in shell mode in Emacs 21.2.95., Andreas Schwab, 2003/02/13
- Re: Problems with ANSI colors in shell mode in Emacs 21.2.95., Lute Kamstra, 2003/02/13
- Re: Problems with ANSI colors in shell mode in Emacs 21.2.95., Francesco Potorti`, 2003/02/20
- Re: Problems with ANSI colors in shell mode in Emacs 21.2.95., Andreas Schwab, 2003/02/21
- Re: Problems with ANSI colors in shell mode in Emacs 21.2.95., Richard Stallman, 2003/02/21
Re: Problems with ANSI colors in shell mode in Emacs 21.2.95., Francesco Potorti`, 2003/02/10
- Re: Problems with ANSI colors in shell mode in Emacs 21.2.95.,
Lute Kamstra <=