Subject: Re: HOME and bash
From: [email-masked] (James Dumser)

27 Jan 1997 16:05:01 -0800
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Original-To: [email-masked] (Ron Forrester)
Original-Cc: [email-masked]
In-Reply-To: <[email-masked]> from "Long Doan" at Jan 24, 97 10:21:20 am
X-MIMI-Options: headers none
X-Mailer: ELM [version 2.4 PL23]
Content-Length: 1095      
Original-Sender: [email-masked]

On Fri, 24 Jan 1997 10:21:20 -0500, Long Doan <[email-masked]> wrote:
>I have a setup similar to yours, so maybe this will help. I set the HOME
>variable via the control panel, like HOME=/home/ld, and in my emacs.bat
>(NTEmacs's startup file) I set HOME=%HOMEDRIVE%%HOMEPATH%, which is
>D:\home\ld. If you want to invoke NTEmacs via some icon, just tell that
>icon to invoke the .bat file.
>
>Ron Forrester wrote:
>> I don't (anymore) define HOME in my .bashrc. I have a bash.cmd which I
>> run to launch bash, which is:
>> 
>> @echo off
>> set HOME=/usr/rjf
>> c:/usr/rjf/b17.1/h-i386-cygwin32/bin/bash.exe
>> exit
>> 
>> this has fixed that problem.

The source of this problem appears to be that bash captures the value
of HOME when it starts -- before it executes .profile/.bashrc -- and
does not pay attention to later changes of the HOME variable (as far as
~ is concerned). Thus setting HOME in your .profile has no effect; ~ is
still the pre-bash value of HOME. (cd without any arguments works
correctly, using the current value of HOME.) 

-- 
James Dumser    972-462-5335 [email-masked]
-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".