delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/03/05/04:25:53

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Message-ID: <20050305092537.10862.qmail@web53404.mail.yahoo.com>
Date: Sat, 5 Mar 2005 01:25:37 -0800 (PST)
From: Dave <d_inabox AT yahoo DOT com>
Subject: Re: chere doesn't cd to directory
To: cygwin AT cygwin DOT com
In-Reply-To: <Pine.GSO.4.61.0503042321540.12630@slinky.cs.nyu.edu>
MIME-Version: 1.0
Note-from-DJ: This may be spam

--- Igor Pechtchanski <pechtcha AT cs DOT nyu DOT 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.

Also, tcsh reads the profile.d scripts from csh.cshrc rather than csh.login. So
a non login tcsh shell would also run the snippet (and cd $(HOME)).

That said, profile.d seems to be a good place for other generic startup that is
done by base-files, since all the shells run them.


Dave.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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