From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andrew Pennebaker Newsgroups: gmane.emacs.help Subject: Re: How do I remove the extra bash-3.2$ from shell-mode? Date: Mon, 4 May 2015 20:42:54 -0500 Message-ID: References: <87r3qvyi4h.fsf@robertthorpeconsulting.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1430790194 15790 80.91.229.3 (5 May 2015 01:43:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 May 2015 01:43:14 +0000 (UTC) Cc: Pascal Bourguignon , Emacs Help To: Robert Thorpe Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue May 05 03:43:14 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 1YpRt8-0001kH-T7 for geh-help-gnu-emacs@m.gmane.org; Tue, 05 May 2015 03:43:11 +0200 Original-Received: from localhost ([::1]:36562 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpRt7-0005A4-UV for geh-help-gnu-emacs@m.gmane.org; Mon, 04 May 2015 21:43:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37019) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpRsv-00059w-NC for help-gnu-emacs@gnu.org; Mon, 04 May 2015 21:42:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YpRss-00057z-T1 for help-gnu-emacs@gnu.org; Mon, 04 May 2015 21:42:57 -0400 Original-Received: from mail-ob0-x230.google.com ([2607:f8b0:4003:c01::230]:35099) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpRss-000574-Nv for help-gnu-emacs@gnu.org; Mon, 04 May 2015 21:42:54 -0400 Original-Received: by obcux3 with SMTP id ux3so119516083obc.2 for ; Mon, 04 May 2015 18:42:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ZAti/ab5jHOFLjMahkYsiJLfaBFOO5k46V+jzcPZyk0=; b=c3SRsv5GVHRQ/HXxJUZ8r8vD75KyGzFj7aVlhMEXKI/mAizXJ+DSEJ8FJfwN0CvZN/ zFiBl6Ecf8VUJoUjaVFEnWGNX3pH4ERA7fW9d7DI3nv7jTAgum/N70X2gI4o8epSgttk /Nm1Vy30zUckASiK5jQJKc2t4o0LLC1bDcQrVUMb5gCVAgwgOweVx/TcgZeSZ6v5BjRc dQVQNSDUcAc3bWx0NupDKXRDfx+mwU1e0I8cCQ+opEVXi/d1Ch4ZXPC2/m/iIX25Zsv+ 9t5LMVbAYM1pR7ZY3KDyU1//f+NluhKhCS4Y7LZPDX4qWsL9oRS+UCkgZUx04OQfxFMj V28A== X-Received: by 10.182.133.40 with SMTP id oz8mr20134384obb.68.1430790174248; Mon, 04 May 2015 18:42:54 -0700 (PDT) Original-Received: by 10.76.125.169 with HTTP; Mon, 4 May 2015 18:42:54 -0700 (PDT) In-Reply-To: <87r3qvyi4h.fsf@robertthorpeconsulting.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::230 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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:104201 Archived-At: Thank you for pointing that out. Turns out I was loading my git prompt with .bash_profile, but not with .bashrc, after I had changed the load style of my bash configuration for speed. I've created https://github.com/mcandre/dotfiles/blob/master/.bashrc.d/emacs-git-prompt.sh to get the best of both worlds: fast shells, and idiomatic Emacs shell prompts! On Mon, May 4, 2015 at 7:37 PM, Robert Thorpe wrote: > 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 > -- Cheers, Andrew