delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/03/03/14:54:56

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
To: cygwin AT cygwin DOT com
From: Wayne Johnson <wdtj AT yahoo DOT com>
Subject: Re: chere doesn't cd to directory
Date: Thu, 3 Mar 2005 19:45:46 +0000 (UTC)
Lines: 24
Message-ID: <loom.20050303T204215-76@post.gmane.org>
References: <loom DOT 20050303T200830-882 AT post DOT gmane DOT org>
Mime-Version: 1.0
X-Complaints-To: usenet AT sea DOT gmane DOT org
X-Gmane-NNTP-Posting-Host: main.gmane.org
User-Agent: Loom/3.14 (http://gmane.org/)
X-Loom-IP: 67.107.38.35 (Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1)
X-Gmane-MailScanner: Found to be clean
X-Gmane-MailScanner: Found to be clean
X-MailScanner-From: goc-cygwin AT m DOT gmane DOT org
X-MailScanner-To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

Wayne Johnson <wdtj <at> yahoo.com> writes:

> 
> One problem though.  Where I do the chere "Bash here" menu entry, it starts 
the
> bash in the home directory.  I dug through the xhere script and found the
> "export CHERE_DIR=`cygpath -u $2`" commented out.  If I comment it back in, I
> get an error because the registry entry didn't pass in the directory name as 
$2.

I just figured out what is wrong.  In /etc/profile I need to replace 
the line:

cd "$HOME"

with

[ -z "$CHERE_INVOKING" ] && cd "$HOME"


Whether this will fix it for all shells, I'm not sure.

Thanks for a great utility.



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