[Top][All Lists]

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

Re: Shell in Cygwin Emacs doesn't source .bashrc

From: Perry Smith
Subject: Re: Shell in Cygwin Emacs doesn't source .bashrc
Date: Mon, 4 Apr 2011 07:05:32 -0500

On Apr 4, 2011, at 12:06 AM, David M. Karr wrote:

I'm on a new Windows Seven box, with the latest released Cygwin and Cygwin Emacs. I copied over my .emacs file from an older Cygwin installation on a Windows XP box.

On the old WinXP box, after I start Emacs and execute "shell", it appears to properly execute my .bashrc, setting my PS1 and putting me in my home directory.

Does your old box have a .bash_profile?  Here is from the man page of bash:

       When  bash is invoked as an interactive login shell, or as a non-inter-
       active shell with the --login option, it first reads and executes  com-
       mands  from  the file /etc/profile, if that file exists.  After reading
       that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile,
       in  that order, and reads and executes commands from the first one that
       exists and is readable.  The --noprofile option may be  used  when  the
       shell is started to inhibit this behavior.

       When  a  login  shell  exits, bash reads and executes commands from the
       file ~/.bash_logout, if it exists.

       When an interactive shell that is not a login shell  is  started,  bash
       reads  and executes commands from ~/.bashrc, if that file exists.  This
       may be inhibited by using the --norc option.  The --rcfile file  option
       will  force  bash  to  read  and  execute commands from file instead of

Note that coming from Emacs, it will be interactive and thus not source .bashrc.  I have my .bash_profile eventually call my .bashrc file.


reply via email to

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