[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: On prompt in shell mode
From: |
Angelo Graziosi |
Subject: |
Re: On prompt in shell mode |
Date: |
Wed, 13 Aug 2008 23:55:40 +0200 |
User-agent: |
Thunderbird 2.0.0.16 (Windows/20080708) |
Stefan Monnier ha scritto:
The following regards Emacs (trunk) both on Linux and Cygwin.
When I do: M-x shell, the prompt has garbage:
^[]0;~/downloads/cygwinports^G address@hidden
^[[33m~/downloads/cygwinports^[[0m $ being echo PS1
\[\e]0;address@hidden \[\e[33m\]\w\[\e[0m\]\n\$
Doesn't look like garbage to me: it looks like the exact
(garbage) codes specified in your PS1. After all \e is ^[ and \a
is ^G (IIRC).
You should be careful to choose the escape sequences in your PS1
according to the escape sequences accepted by the terminal
emulator in which the shell is running (which is reflected in the
$TERM envvar).
Obviously, what you call "the exact (garbage) codes specified in
your PS1" in RXVT, MRXVT, URXVT, (KDE)Konsole produces:
address@hidden ~/downloads/cygwinports $
I do not doubt it. They are codes meant specifically for those
terminal emulators so it's no wonder they do what you want there.
No! They are codes (escape sequences) for BASH shell. Many people use
different shells (zsh, tcsh,...) which have different syntax.
Try it on a wyse terminal, or in the Linux console. M-x shell is not
a terminal
Sorry, but I have already cited GNU/Linux and KDE-Konsole! on which
there is the same problem!... and have sent another post [1].
I have pointed this problem because I think that M-x shell does not
interpret correctly some escape/code; googling or searching in
help-emacs, shows this is an acient problem whose workarounds do not
seem to work with 23 (and 22?).
Obviously that is only my opinion.
Angelo
emulator. M-x term is more likely to do what you want (tho I do not
guarantee that all those escape sequences are supported, especially
the one that sets the window title).
---
[1] http://lists.gnu.org/archive/html/emacs-devel/2008-08/msg00556.html
- On prompt in shell mode, Angelo Graziosi, 2008/08/12
- Re: On prompt in shell mode, adg, 2008/08/12
- Re: On prompt in shell mode, Chong Yidong, 2008/08/12
- Re: On prompt in shell mode, Stefan Monnier, 2008/08/12
- Re: On prompt in shell mode, Angelo Graziosi, 2008/08/12
- Re: On prompt in shell mode, Stefan Monnier, 2008/08/13
- Re: On prompt in shell mode,
Angelo Graziosi <=
- Re: On prompt in shell mode, Stefan Monnier, 2008/08/13
- Re: On prompt in shell mode, Angelo Graziosi, 2008/08/13
- Re: On prompt in shell mode, David Hansen, 2008/08/13
- Re: On prompt in shell mode, Stefan Monnier, 2008/08/13
- Re: On prompt in shell mode, Angelo Graziosi, 2008/08/13
- Re: On prompt in shell mode, Angelo Graziosi, 2008/08/14
- Re: On prompt in shell mode, David Hansen, 2008/08/14
- Re: On prompt in shell mode, Angelo Graziosi, 2008/08/14
Re: On prompt in shell mode, Richard M. Stallman, 2008/08/13