|
From: | Angelo Graziosi |
Subject: | Re: On prompt in shell mode |
Date: | Tue, 12 Aug 2008 22:49:02 +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 $beingecho 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 $in which 'address@hidden' is in green, '~/downloads/cygwinports' in yellow and '$' white.
It is only in Emacs shell mode (M-x shell) it produces 'garbage', both in GNU/Linux and Cygwin builds of current trunk.
Is there a method to redefine PS1 in .emacs? Using 'address@hidden \w\n $' for PS1 would be enough. Cheers, Angelo.
[Prev in Thread] | Current Thread | [Next in Thread] |