help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I remove the extra bash-3.2$ from shell-mode?


From: Andrew Pennebaker
Subject: Re: How do I remove the extra bash-3.2$ from shell-mode?
Date: Mon, 4 May 2015 20:42:54 -0500

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]