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 03:24:34 +0200 Message-ID: <48A38952.50400@alice.it> References: <48A198B6.4080206@alice.it> <48A1F73E.4040504@alice.it> <48A3585C.9010208@alice.it> <48A36803.6020908@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 1218677118 17820 80.91.229.12 (14 Aug 2008 01:25:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Aug 2008 01:25:18 +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 03:26:10 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 1KTRbN-0001Sk-Iy for ged-emacs-devel@m.gmane.org; Thu, 14 Aug 2008 03:26:09 +0200 Original-Received: from localhost ([127.0.0.1]:54980 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KTRaR-0002cj-7Q for ged-emacs-devel@m.gmane.org; Wed, 13 Aug 2008 21:25:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KTRaN-0002bj-1h for emacs-devel@gnu.org; Wed, 13 Aug 2008 21:25:07 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KTRaK-0002al-Rb for emacs-devel@gnu.org; Wed, 13 Aug 2008 21:25:05 -0400 Original-Received: from [199.232.76.173] (port=53673 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KTRaK-0002af-Np for emacs-devel@gnu.org; Wed, 13 Aug 2008 21:25:04 -0400 Original-Received: from smtp-out114.alice.it ([85.37.17.114]:2659) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KTRaK-0001or-Jh for emacs-devel@gnu.org; Wed, 13 Aug 2008 21:25:04 -0400 Original-Received: from FBCMMO02.fbc.local ([192.168.68.196]) by smtp-out114.alice.it with Microsoft SMTPSVC(6.0.3790.1830); Thu, 14 Aug 2008 03:25:02 +0200 Original-Received: from FBCMCL01B07.fbc.local ([192.168.171.45]) by FBCMMO02.fbc.local with Microsoft SMTPSVC(6.0.3790.1830); Thu, 14 Aug 2008 03:25:02 +0200 Original-Received: from [87.6.223.172] ([87.6.223.172]) by FBCMCL01B07.fbc.local with Microsoft SMTPSVC(6.0.3790.1830); Thu, 14 Aug 2008 03:21:48 +0200 User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) In-Reply-To: X-OriginalArrivalTime: 14 Aug 2008 01:21:48.0265 (UTC) FILETIME=[1F600D90:01C8FDAC] 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:102427 Archived-At: David Hansen ha scritto: > You have to quote the backslash with another backslash (the lisp > reader interprets it special in strings): "address@hidden \\w\\n$". > How about: > > if [ "x$EMACS" = xt ]; then > # set up your prompt for M-x shell. > else > # fancy prompt for real terminals. > fi > > in ~/.bashrc. Stefan Monnier ha scritto: > > I personally only use `xterm', so I use code like: > > if [[ $TERM == xterm* ]]; then PROMPT=$(print -n > "%{\033]0;%m%${my_uid}(#..-%n)\007%}%B%2c-%?%#%b ") else > PS1="%B%${my_uid}(#..%n@)%m-%2c-%?%#%b " fi > > in my .zshrc, tho this is for Zsh so it won't work as is for you. > Many thanks for these helpful suggestions, and your time. Cheers, Angelo