From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Angelo Graziosi Newsgroups: gmane.emacs.devel Subject: Re: On prompt in shell mode Date: Thu, 14 Aug 2008 10:50:30 +0200 Message-ID: <48A3F1D6.2090409@alice.it> References: <48A198B6.4080206@alice.it> <48A1F73E.4040504@alice.it> <48A3585C.9010208@alice.it> <48A36803.6020908@alice.it> <48A38952.50400@alice.it> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1218703943 13691 80.91.229.12 (14 Aug 2008 08:52:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Aug 2008 08:52:23 +0000 (UTC) Cc: david.hansen@gmx.net, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 14 10:53:14 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 1KTYZv-0008Rd-Oi for ged-emacs-devel@m.gmane.org; Thu, 14 Aug 2008 10:53:08 +0200 Original-Received: from localhost ([127.0.0.1]:37614 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KTYYz-0006cD-8C for ged-emacs-devel@m.gmane.org; Thu, 14 Aug 2008 04:52:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KTYY2-0006EP-Hp for emacs-devel@gnu.org; Thu, 14 Aug 2008 04:51:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KTYXy-0006Be-4u for emacs-devel@gnu.org; Thu, 14 Aug 2008 04:51:09 -0400 Original-Received: from [199.232.76.173] (port=56121 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KTYXx-0006BR-Tb for emacs-devel@gnu.org; Thu, 14 Aug 2008 04:51:05 -0400 Original-Received: from smtp-out28.alice.it ([85.33.2.28]:3728) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KTYXx-0005Ja-GU for emacs-devel@gnu.org; Thu, 14 Aug 2008 04:51:05 -0400 Original-Received: from FBCMMO03.fbc.local ([192.168.68.197]) by smtp-out28.alice.it with Microsoft SMTPSVC(6.0.3790.1830); Thu, 14 Aug 2008 10:51:02 +0200 Original-Received: from FBCMCL01B08.fbc.local ([192.168.171.46]) by FBCMMO03.fbc.local with Microsoft SMTPSVC(6.0.3790.1830); Thu, 14 Aug 2008 10:51:01 +0200 Original-Received: from [82.57.173.192] ([82.57.173.192]) by FBCMCL01B08.fbc.local with Microsoft SMTPSVC(6.0.3790.1830); Thu, 14 Aug 2008 10:49:31 +0200 User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) In-Reply-To: <48A38952.50400@alice.it> X-OriginalArrivalTime: 14 Aug 2008 08:49:31.0781 (UTC) FILETIME=[AB474B50:01C8FDEA] X-detected-kernel: by monty-python.gnu.org: Windows 2000 SP4, XP SP1+ 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:102432 Archived-At: Just for completeness... David Hansen wrote: > How about: > > if [ "x$EMACS" = xt ]; then > # set up your prompt for M-x shell. > else > # fancy prompt for real terminals. > fi Well, it works just fine on GNU/Linux but not on Cygwin! On Cygwin, it seems that only the 'else' branch is followed. Indeed using if [ "x$EMACS" = xt ]; then # set up your prompt for M-x shell. PS1='OK1> ' else # fancy prompt for real terminals. PS1='OK2> ' fi both terminals (rxvt, mrxvt, urxvt, xterm...) and Emacs 'M-x shell' have OK2> !!! but... M-x shell OK2> echo $EMACS t Cheers, Angelo.