www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/06/08/19:32:43

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <4A2D9947.1080606@aim.com>
References: <4A2D9947 DOT 1080606 AT aim DOT com>
Date: Tue, 9 Jun 2009 01:32:27 +0200
Message-ID: <e01d8a50906081632t238a268dt28d5b55e29996773@mail.gmail.com>
Subject: Re: Bug in $PATH initialization?
From: Lennart Borgman <lennart DOT borgman AT gmail DOT com>
To: Mark Harig <idirectscm AT aim DOT com>
Cc: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Tue, Jun 9, 2009 at 1:05 AM, Mark Harig<idirectscm AT aim DOT com> wrote:
> From the bash manual (in emacs: M-: (info "(bash) Bash Startup Files")):
>
> "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."
>
> So, in the typical case, when you start bash with '-i', it sources the
> following files:
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 /etc/profile =C2=A0 # which typically contain=
s PATH initialization
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 ~/.bash_profile =C2=A0# or some other "login"=
 file, such as ~/.profile
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 ~/.bash_profile will usually source ~/.bashrc=
 (the non-login code)
>
> To avoid having these files read, start bash with '--noprofile' (if you w=
ish
> to avoid reading /etc/profile and ~/.bash_profile) and '--norc' (if you w=
ish
> to avoid reading ~/.bashrc. =C2=A0Or, simply edit /etc/profile and ~/.bas=
hrc,
> where PATH is typically set to get PATH to have the ordering that you
> want.

Thanks Mark. I might need this information, I am not sure at the
moment, but I am trying to do avoid changing anything in this file. I
am not the user so to say.

What I am trying to do is to make the setup for the command
cygwin-shell in the Emacs+EmacsW32 distro as automatic as possible.
The user should not have to care. It should just work. (This is native
Emacs, compiled for windows, not for cygwin.)

So therefor I check the cygwin installation from the windows registry
and try to add the path for cygwin as I told before.

The information I got here is that the result from what I do should
work as expected. There is now only one flaw and that is that cygwin
will not show the expected path in $PATH. This could be a source of
great confusion and waste a lot of time for a user hunting a difficult
error so it would be good if it could be fixed.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019