[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: File.expand_path and ~ on windows

Austin Ziegler

9/19/2003 3:15:00 AM

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.

-austin
--
austin ziegler * austin@halostatue.ca * Toronto, ON, Canada
software designer * pragmatic programmer * 2003.09.18
* 23.12.23



2 Answers

Sean O'Dell

9/19/2003 4:00:00 PM

0

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.

Sean O''Dell

Gavin Sinclair

9/20/2003 12:58:00 AM

0

On Saturday, September 20, 2003, 2:18:35 AM, Sean 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.

I use Windows, and choose to set HOME to D:/home/gavin, so that
Windows and Cygwin can be in agreement. Certain Windows programs will
make use of any %HOME% setting.

Gavin