This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: bash and ~




>Date: Tue, 24 Feb 1998 07:41:57 -0600
>From: James Dumser <dumser@rtis.ray.com>
>To: Daniel Karipides <karipid@mae.cornell.edu>
>CC: gnu-win32@cygnus.com
>Subject: Re: bash and ~
>
>On Mon, 23 Feb 1998 10:46:06 -0500, Daniel Karipides 
>  <karipid@mae.cornell.edu> wrote:
>> I have defined the enivornment variable $HOME to:
>>   D:\Users\smith
>> I need it defined this way so that emacs (among other programs) works
>> correctly when not started from bash.  However, in bash I noticed the
>> following:
>>   bash$ echo $HOME
>>   D:\Users\smith        <--seems to work
>>   bash$ cd ~
>>   bash.exe: D:Userssmith: No such file or directory
>
>I send someone info on this recently -- don't remember if it was you or
>not, Daniel -- but apparently it justifies a reply to the list.
>
>It's important to remember that ~ != $HOME in that they are not the 
same

the tilde "~" gets translated to the value of the HOME environment 
variable.  So ~ is equal to HOME.

>variable. ~ is set *ONLY* when bash is started. $HOME can be changed at
>any time. So, to accomplish what you want:
>
>  autoexec.bat / environment setup:
>    set HOME=d:\users\smith
>
>  startbash.cmd (or .bat):
>    @echo off
>    set HOME=d:/users/smith
>    bash
>
>  .bashrc / .profile:
>    set HOME=d:\\users\\smith (or 'd:\users\smith')
>
>The idea is to "fix" $HOME just prior to starting bash so ~ is set
>correctly and then setting it back so that emacs will work.
>

As someone else pointed out on this thread simply 
"SET HOME=d:/users/smith" and then HOME will work in both emacs and the 
cygwin32 bash programs.


>-- 
>James Dumser    972.462.5335    dumser@rtis.ray.com
>-
>For help on using this list (especially unsubscribing), send a message 
to
>"gnu-win32-request@cygnus.com" with one line of text: "help".
>


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]