From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Dyballa Newsgroups: gmane.emacs.help Subject: Re: shell prompt undesired characters Date: Wed, 8 Apr 2009 20:15:52 +0200 Message-ID: <2C9D0EB0-90D2-405D-A325-936FE6305F52@web.de> References: <877i1vkrmd.fsf@stats.ox.ac.uk> <8763hf2frd.fsf@stats.ox.ac.uk> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=WINDOWS-1252; delsp=yes; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1239214696 13046 80.91.229.12 (8 Apr 2009 18:18:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Apr 2009 18:18:16 +0000 (UTC) Cc: help-gnu-emacs mailing list To: Dan Davison Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 08 20:19:35 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LrcLX-0007v5-MO for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Apr 2009 20:17:59 +0200 Original-Received: from localhost ([127.0.0.1]:45570 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LrcK8-0007bG-Li for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Apr 2009 14:16:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LrcJf-0007XN-0Y for help-gnu-emacs@gnu.org; Wed, 08 Apr 2009 14:16:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LrcJa-0007QP-2l for help-gnu-emacs@gnu.org; Wed, 08 Apr 2009 14:16:02 -0400 Original-Received: from [199.232.76.173] (port=36467 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LrcJZ-0007Pv-MO for help-gnu-emacs@gnu.org; Wed, 08 Apr 2009 14:15:57 -0400 Original-Received: from fmmailgate02.web.de ([217.72.192.227]:58552) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LrcJZ-0008SF-3u for help-gnu-emacs@gnu.org; Wed, 08 Apr 2009 14:15:57 -0400 Original-Received: from smtp05.web.de (fmsmtp05.dlan.cinetic.de [172.20.4.166]) by fmmailgate02.web.de (Postfix) with ESMTP id 09AFFFCAD89E; Wed, 8 Apr 2009 20:15:55 +0200 (CEST) Original-Received: from [91.35.204.223] (helo=[192.168.1.2]) by smtp05.web.de with asmtp (TLSv1:AES128-SHA:128) (WEB.DE 4.110 #277) id 1LrcJW-0005LI-00; Wed, 08 Apr 2009 20:15:54 +0200 In-Reply-To: <8763hf2frd.fsf@stats.ox.ac.uk> X-Mailer: Apple Mail (2.753.1) X-Sender: Peter_Dyballa@web.de X-Provags-ID: V01U2FsdGVkX1/KX1Y+FBd1c98uCPRedG+NekmDEmZgQLpYWYfi jNSAxM0G6HVTNgijK6PEskEpNvCAs/+VKvL06zURdYLvlSrRnm ukGH+NrRFKFtfP5q2Exg== X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:63583 Archived-At: Am 08.04.2009 um 19:53 schrieb Dan Davison: > I've tried without any > ~/.emacs I mentioned ~/.emacs_bash =96 it only customises bash when run inside =20= *shell* buffer. And this file is more useful than a car because it =20 can switch off so many things that are fine in a (dumb) terminal =20 emulation which GNU Emacs can do better. > and ~/.bashrc, on emacs22, and I still get those initial > characters. Bash uses much more files, see 'man bash' or other bash documentation =20= (obviously there are good reasons why I don't use bash by default). > They're not coming from $PS1, so where are they coming from? Can you also check the meaning of PS1 in GNU Emacs's *shell* buffer? =20 In a terminal I have = PS1=3D'\e[34;47;1m\j-\[\033[0;32m\]ttyp\[\033[0;31m\]://\[\033[0;32m\]=20= pete\[\033[0;31m\]:5\[\033[0;34m\]${PWD/$HOME//~pete}\e[33;46;1m \! /\=20= \ \[\033[0m\]' in *shell* buffer it's PS1=3D'\h:\w \u\$ ' Thanks to ~/.emacs_bash, which does not contain ELisp but shell code: PATH=3D$(defaults read "${HOME}/.MacOSX/environment" PATH) MANPATH=3D$(defaults read "${HOME}/.MacOSX/environment" MANPATH) PS1=3D'\h:\w \u\$ ' unset DYLD_LIBRARY_PATH BASH_ENV=3D${HOME}/Library/init/bash/aliases.mine -- Greetings Pete They that can give up essential liberty to obtain a little temporary =20 safety deserve neither liberty nor safety. -Benjamin Franklin, Historical Review of Pennsylvania.