From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: On prompt in shell mode Date: Tue, 12 Aug 2008 15:46:27 -0400 Message-ID: References: <48A198B6.4080206@alice.it> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1218570432 22976 80.91.229.12 (12 Aug 2008 19:47:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 12 Aug 2008 19:47:12 +0000 (UTC) Cc: emacs-devel@gnu.org To: Angelo Graziosi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 12 21:48:03 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KSzqY-0008Mr-Fl for ged-emacs-devel@m.gmane.org; Tue, 12 Aug 2008 21:47:58 +0200 Original-Received: from localhost ([127.0.0.1]:58215 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KSzpc-000791-3X for ged-emacs-devel@m.gmane.org; Tue, 12 Aug 2008 15:47:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KSzpE-0006uH-74 for emacs-devel@gnu.org; Tue, 12 Aug 2008 15:46:36 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KSzpC-0006sW-ID for emacs-devel@gnu.org; Tue, 12 Aug 2008 15:46:35 -0400 Original-Received: from [199.232.76.173] (port=51141 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KSzpC-0006rk-4N for emacs-devel@gnu.org; Tue, 12 Aug 2008 15:46:34 -0400 Original-Received: from smtp-04.arnet.com.ar ([200.45.191.26]:43191) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1KSzp9-0006HZ-SR for emacs-devel@gnu.org; Tue, 12 Aug 2008 15:46:32 -0400 Original-Received: (qmail 4250 invoked from network); 12 Aug 2008 19:44:41 -0000 Original-Received: from unknown (HELO ceviche.home) (190.30.131.157) by 0 with SMTP; 12 Aug 2008 19:44:41 -0000 Original-Received: by ceviche.home (Postfix, from userid 20848) id 34DBBB40A9; Tue, 12 Aug 2008 15:46:27 -0400 (EDT) In-Reply-To: <48A198B6.4080206@alice.it> (Angelo Graziosi's message of "Tue, 12 Aug 2008 16:05:42 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:102374 Archived-At: > The following regards Emacs (trunk) both on Linux and Cygwin. > When I do: M-x shell, the prompt has garbage: > ^[]0;~/downloads/cygwinports^G > ^[[32mangelo@host ^[[33m~/downloads/cygwinports^[[0m > $ > being > echo PS1 > \[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\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). Stefan