unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Angelo Graziosi <angelo.graziosi@alice.it>
To: david.hansen@gmx.net
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: Re: On prompt in shell mode
Date: Thu, 14 Aug 2008 15:21:24 +0200	[thread overview]
Message-ID: <48A43154.9020607@alice.it> (raw)
In-Reply-To: <48A3F1D6.2090409@alice.it>

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




  parent reply	other threads:[~2008-08-14 13:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-12 14:05 On prompt in shell mode Angelo Graziosi
2008-08-12 14:10 ` adg
2008-08-12 14:17   ` Angelo Graziosi
2008-08-12 18:19 ` Chong Yidong
2008-08-13 10:03   ` Angelo Graziosi
2008-08-12 19:46 ` Stefan Monnier
2008-08-12 20:49   ` Angelo Graziosi
2008-08-13 20:42     ` Stefan Monnier
2008-08-13 21:55       ` Angelo Graziosi
2008-08-13 22:37         ` Stefan Monnier
2008-08-13 23:02           ` Angelo Graziosi
2008-08-13 23:17             ` David Hansen
2008-08-13 23:55             ` Stefan Monnier
2008-08-14  1:24               ` Angelo Graziosi
2008-08-14  8:50                 ` Angelo Graziosi
2008-08-14 10:22                   ` David Hansen
2008-08-14 13:21                   ` Angelo Graziosi [this message]
2008-08-13  6:26 ` Richard M. Stallman

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=48A43154.9020607@alice.it \
    --to=angelo.graziosi@alice.it \
    --cc=david.hansen@gmx.net \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).