From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robert Thorpe Newsgroups: gmane.emacs.help Subject: Re: How do I remove the extra bash-3.2$ from shell-mode? Date: Tue, 05 May 2015 01:37:18 +0100 Message-ID: <87r3qvyi4h.fsf@robertthorpeconsulting.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1430786266 22917 80.91.229.3 (5 May 2015 00:37:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 May 2015 00:37:46 +0000 (UTC) Cc: pjb@informatimago.com, help-gnu-emacs@gnu.org To: Andrew Pennebaker Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 05 02:37:36 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YpQre-00080W-H2 for geh-help-gnu-emacs@m.gmane.org; Tue, 05 May 2015 02:37:34 +0200 Original-Received: from localhost ([::1]:36414 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpQrd-0000RJ-F7 for geh-help-gnu-emacs@m.gmane.org; Mon, 04 May 2015 20:37:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpQrT-0000RE-KK for help-gnu-emacs@gnu.org; Mon, 04 May 2015 20:37:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YpQrQ-00079m-DI for help-gnu-emacs@gnu.org; Mon, 04 May 2015 20:37:23 -0400 Original-Received: from outbound-smtp01.blacknight.com ([81.17.249.7]:34701) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpQrQ-00079R-8n for help-gnu-emacs@gnu.org; Mon, 04 May 2015 20:37:20 -0400 Original-Received: from mail.blacknight.com (pemlinmail01.blacknight.ie [81.17.254.10]) by outbound-smtp01.blacknight.com (Postfix) with ESMTPS id 85255989E6 for ; Tue, 5 May 2015 00:37:18 +0000 (UTC) Original-Received: (qmail 9251 invoked from network); 5 May 2015 00:37:18 -0000 Original-Received: from unknown (HELO RTLaptop) (rt@robertthorpeconsulting.com@[109.79.125.211]) by 81.17.254.9 with ESMTPSA (DHE-RSA-AES128-SHA encrypted, authenticated); 5 May 2015 00:37:18 -0000 In-Reply-To: (message from Andrew Pennebaker on Mon, 4 May 2015 19:09:26 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 81.17.249.7 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:104200 Archived-At: Andrew Pennebaker writes: > Emacs seems to be printing its default PS1 prompt before emacs_bash has > fully executed. Is there a way to suppress this? I think the problem is that bash prints out the prompt when it starts. It's only after it has read the line changing the prompt that it can actually change the prompt. The info manual says "The value of the variable `PROMPT_COMMAND' is examined just before Bash prints each primary prompt." So, at the start of the .bashrc it has the wrong value, so one line is wrong. I think you have to use -p to change the value for the first line. I think your environment is configured oddly if you're seeing this prompt at all. BR, Robert Thorpe