emacs-devel
[Top][All Lists]
Advanced

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

Re: On prompt in shell mode


From: Angelo Graziosi
Subject: Re: On prompt in shell mode
Date: Thu, 14 Aug 2008 15:21:24 +0200
User-agent: Thunderbird 2.0.0.16 (Windows/20080708)

David Hansen wrote:

Angelo Graziosi wrote:

On Cygwin, it seems that only the 'else' branch is followed. Indeed using

if [ "x$EMACS" = xt ]; then
# set up your prompt for M-x shell.
PS1='OK1> '
else
# fancy prompt for real terminals.
PS1='OK2> '
fi

What shell do you use?  The brackets may be a bash extension.  You can
try: if test "x$EMACS" = xt; then ...

I think the cause is this: on Cygwin .bashrc is 'executed by bash for
login shells', instead on Linux it is 'executed by bash for NON login
shells'! and I think M-x shell executes a NON-login shell, i.e. it does
not execute .bashrc!

This seems to be confirmed by

   M-x shell
   OK2> . ~/.bashrc
   OK1>

i.e. the prompt I ask for Emacs M-x shell!

      Angelo




reply via email to

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