Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <1376.192.168.0.12.1110016424.squirrel@mail.morrison.mine.nu>
In-Reply-To: <20050305092537.10862.qmail@web53404.mail.yahoo.com>
References: <Pine.GSO.4.61.0503042321540.12630@slinky.cs.nyu.edu> <20050305092537.10862.qmail@web53404.mail.yahoo.com>
Date: Sat, 5 Mar 2005 09:53:44 -0000 (GMT)
Subject: Re: chere doesn't cd to directory
From: "John Morrison (Cygwin)" <john@morrison.mine.nu>
To: "Dave" <d_inabox@yahoo.com>
Cc: cygwin@cygwin.com
Reply-To: cygwin-apps@cygwin.com
User-Agent: SquirrelMail/1.4.4
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: 8bit

On Sat, March 5, 2005 9:25 am, Dave said:
> --- Igor Pechtchanski <pechtcha@cs.nyu.edu> wrote:
>
>> On Fri, 4 Mar 2005, Dave wrote:
>> > The cd occurs in /etc/profile for bash, ash, and pdksh; /etc/zprofile
>> > for zsh; /etc/csh.login for tcsh.
>
>> I don't recall if this was part of the discussion, but any particular
>> reason you're not doing this in a /etc/profile.d script instead?  That
>> way, it would work even with a custom /etc/profile.
>
> I honestly hadn't thought of that... and I don't recall it being
> mentioned.
>
> The issue is that chere wants to stop the standard login script from doing
> the
> usual cd $(HOME). The profile.d scripts get run before the cd, and hence
> th cd
> happens anyway. If the order were changed, we'd have lost the directory we
> wanted anyway.
>
> The 'cd $(HOME)' could be removed from /etc/profile, but then the
> profile.d
> script would be required even when chere were not installed.

Not if there was a script called (something like)...

00cd.sh

included in the base-files which just did a cd $HOME.  As long as the
chere script was after this one it should cd $HOME then cd $CHERE...
thoughts?

J.


--
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/

