From: Andrew Pennebaker <andrew.pennebaker@gmail.com>
To: Robert Thorpe <rt@robertthorpeconsulting.com>
Cc: Pascal Bourguignon <pjb@informatimago.com>,
Emacs Help <help-gnu-emacs@gnu.org>
Subject: Re: How do I remove the extra bash-3.2$ from shell-mode?
Date: Mon, 4 May 2015 20:42:54 -0500 [thread overview]
Message-ID: <CAHXt_SWAMQxaHNxCBD_au3Q3Rf88akzbCuVPR_YwSm7VPLyeUg@mail.gmail.com> (raw)
In-Reply-To: <87r3qvyi4h.fsf@robertthorpeconsulting.com>
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 <rt@robertthorpeconsulting.com
> wrote:
> Andrew Pennebaker <andrew.pennebaker@gmail.com> 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
next prev parent reply other threads:[~2015-05-05 1:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.2337.1430772503.904.help-gnu-emacs@gnu.org>
2015-05-04 20:50 ` How do I remove the extra bash-3.2$ from shell-mode? Pascal J. Bourguignon
[not found] ` <mailman.2343.1430776948.904.help-gnu-emacs@gnu.org>
2015-05-04 21:58 ` Pascal J. Bourguignon
2015-05-04 22:00 ` Pascal J. Bourguignon
2015-05-05 0:09 ` Andrew Pennebaker
2015-05-05 0:37 ` Robert Thorpe
2015-05-05 1:42 ` Andrew Pennebaker [this message]
[not found] ` <mailman.2355.1430784572.904.help-gnu-emacs@gnu.org>
2015-05-05 0:20 ` Pascal J. Bourguignon
2015-05-04 22:02 ` Andrew Pennebaker
2015-05-04 20:48 Andrew Pennebaker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHXt_SWAMQxaHNxCBD_au3Q3Rf88akzbCuVPR_YwSm7VPLyeUg@mail.gmail.com \
--to=andrew.pennebaker@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=pjb@informatimago.com \
--cc=rt@robertthorpeconsulting.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).