From: Austin Ziegler Date: 2003-09-20T02:27:39+09:00 Subject: Re: File.expand_path and ~ on windows On Sat, 20 Sep 2003 01:18:35 +0900, Sean O'Dell wrote: > Austin Ziegler wrote: >> On Fri, 19 Sep 2003 11:36:28 +0900, Tom Felker wrote: >>> Wouldn't it make more sense to expand it to My Documents >>> (C:\Documents and Settings\Username\My Documents on WinXP)? I >>> suppose it would be worthwhile to be able to disable it, though. >> No. ~ has no meaning to Windows shells. There are times when I wish >> that it didn't to Unix shells. After all, that's what ${HOME} is for. > This is true; but I think for portability reasons, since COMMAND.COM > isn't exactly what I would call a culture of shell idioms, ~ and ${HOME} > (%HOME%) should be considered synonymous. If not ~, then at least > ${HOME} ought to point to C:\Documents and Settings\UserName I think. That's a no fly zone, as far as I'm concerned. My %HOME% is not the same as my %USERPROFILE%. Further, ~foo is a valid filename on Windows. (It's valid in Unix, too, but you have to do \~foo to get it to work from the shell.) I'd like to see Ruby handle this right on each platform. -austin -- austin ziegler * austin@halostatue.ca * Toronto, ON, Canada software designer * pragmatic programmer * 2003.09.19 * 13.23.38