Mail Archives: cygwin/1997/06/02/20:46:29
On Sat, 31 May 1997 19:55:38 -0400, franl AT world DOT std DOT com (Francis
Litterio) wrote:
>I just noticed this bash oddity (with c:/ mounted as /):
>
> bash$ echo $HOME
> /franl
> bash $ echo ~
> c:/franl
>
>Isn't ~ supposed to expand to the current value of the variable HOME?
Not positive on the "correct" interpretation of ~ in bash; but in
cygwin's bash, ~ is only defined on startup -- changing HOME after that
will not change the value of ~. In fact, to get it right, you'll need to
set HOME the way you want it before starting bash. I do this with an
icon and a batch file:
- icon runs "c:\bin\shlogin.cmd /home/dumser"
- shlogin.cmd contains
@echo off
set HOME=%1
if "%2"=="" c:\bin\sh -login
if not "%2"=="" c:\bin\sh -login -c "%2 %3 %4 %5 %6 %7 %8 %9"
(I tried using %* [CMD's equivalent of $*] after shifting %1 off the
stack but that didn't work -- the first argument did not get dropped off
%*. Does anyone know of a way to do this without having to manually
expand %2 %3 ...?)
Of course, Win95's COMMAND.COM is less featured than even CMD so you'll
probably need to use the brute force method above.
--
James Dumser 972-462-5335 dumser AT ti DOT com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -