Irb/init.rb code suggestion to find user's home directory in


#1

e$B$1$$$8$e!w$$$7$D$+$G$9e(B.

e$BD>%a%$%k$GE:IU$N$h$&$J%a%$%k$,Mh$^$7$?e(B.

e$B$Ge(B, Windowse$B$K$"$^$j>$7$/$J$$$N$Ge(B,
e$B<1<T$NJ}$K<ALd$J$N$G$9$,e(B,

HOMEPATHe$B$H$$$&$N$Oe(B, e$B%a%8%c!<$J$b$N$J$N$G$7$g$&$+e(B?
e$B$5$i$Ke(B,
e$B;H$$J}e(B(.irbrce$B$NCV$->le(B)e$B$H$7$FBEEv$J$b$N$G$7$g$&$+e(B?


Message-ID: removed_email_address@domain.invalid
Date: Thu, 08 Jun 2006 10:00:37 -0500
To: removed_email_address@domain.invalid
Subject: irb/init.rb code suggestion to find user’s home directory in
windows

Hi,

To find the user’s home directory in MSoft’s Windows I suggest you add
the following three lines to irb/ init.rb -
if home = ENV[“HOMEPATH”]
yield proc{|rc| home+"/.irb#{rc}"}
end
… after the existing code …
if home = ENV[“HOME”]
yield proc{|rc| home+"/.irb#{rc}"}
end

Best,

Lawrence.

__
---------------------------------------------------->> e$B@PDMe(B
e$B7=<ye(B <<—
---------------------------------->> e-mail: removed_email_address@domain.invalid <<—


#2

e$B4d7n$H?=$7$^$9!#e(B

06/06/09 e$B$Ke(B Keiju ISHITSUKAremoved_email_address@domain.invalid
e$B$5$s$O=q$-$^$7$?e(B:

HOMEPATHe$B$H$$$&$N$Oe(B, e$B%a%8%c!<$J$b$N$J$N$G$7$g$&$+e(B?
e$B$5$i$Ke(B, e$B;H$$J}e(B(.irbrce$B$NCV$->le(B)e$B$H$7$FBEEv$J$b$N$G$7$g$&$+e(B?

e$B;d$Oe(B Windows 2000 e$B$He(B XP
e$B$G;H$o$l$F$$$k$N$r3NG’$7$F$$$^$9!#e(B
e$B$^$?!"%^%$%/%m%=%U%H$N%5%]!<%H>pJs$r8+$k$He(B NT e$B$G$b;H$o$l$Fe(B
e$B$$$k$h$&$G$9e(B(e$B$H$$$&$+!"$3$A$i$,:G=i$J$N$G$7$g$&$Me(B)e$B!#e(B

Windows NT e$B$N4D6-JQ?te(B
http://support.microsoft.com/default.aspx?scid=kb;ja;100843

Windows 95 e$B$J$I$G$OMQ0U$5$l$F$$$J$$$=$&$G$9!#e(B
e$B<j85$K$"$ke(B Windows 98 SE
e$B$G@_Dj$5$l$F$$$J$$$3$H$r3NG’$7$^$7$?!#e(B

e$B$"$H!">e5-%Z!<%8$K$b$"$j$^$9$h$&$Ke(B HOMEPATH
e$B$K$O%I%i%$%VL>$,4^$^$l$^$;$s$N$G!“e(B
HOMEDRIVE e$B$H$$$&4D6-JQ?t$b0l=o$K;H$&I,MW$,$”$j$=$&$G$9!#e(B

echo %HOMEPATH%
\home\don
echo %HOMEDRIVE%
D:


#3

e$B$J$+$@$G$9!#e(B

At Fri, 9 Jun 2006 00:43:36 +0900,
Keiju ISHITSUKA wrote in [ruby-dev:28700]:

HOMEPATHe$B$H$$$&$N$Oe(B, e$B%a%8%c!<$J$b$N$J$N$G$7$g$&$+e(B?
e$B$5$i$Ke(B, e$B;H$$J}e(B(.irbrce$B$NCV$->le(B)e$B$H$7$FBEEv$J$b$N$G$7$g$&$+e(B?

e$B4D6-8GM-$N$b$N$J$N$G!"e(Birbe$B$GBP1~$9$k$N$O$A$g$C$H0c$&$h$&$Je(B
e$B5$$b$7$J$/$O$J$$$N$G$9$,!#$A$J$_$Ke(B1.9e$B$G$O!"e(BHOMEe$B$,L$Dj5A$J$ie(B

  1. HOMEDRIVE+HOMEPATH
  2. USERPROFILE
  3. e$B%^%$e(B e$B%I%-%e%a%s%He(B
    e$B$r=g$KC5$7$Fe(BHOMEe$B$K%;%C%H$9$k$h$&$K$J$C$F$$$^$9!#e(B

#4

e$B$1$$$8$e!w$$$7$D$+$G$9e(B.

In [ruby-dev:28702] the message: “[ruby-dev:28702] Re: irb/init.rb
code suggestion to find user’s home directory in windows”, on Jun/09
10:22(JST) removed_email_address@domain.invalid writes:

e$B$J$+$@$G$9!#e(B

HOMEPATHe$B$H$$$&$N$Oe(B, e$B%a%8%c!<$J$b$N$J$N$G$7$g$&$+e(B?
e$B$5$i$Ke(B, e$B;H$$J}e(B(.irbrce$B$NCV$->le(B)e$B$H$7$FBEEv$J$b$N$G$7$g$&$+e(B?

e$B4D6-8GM-$N$b$N$J$N$G!"e(Birbe$B$GBP1~$9$k$N$O$A$g$C$H0c$&$h$&$Je(B
e$B5$$b$7$J$/$O$J$$$N$G$9$,!#$A$J$_$Ke(B1.9e$B$G$O!"e(BHOMEe$B$,L$Dj5A$J$ie(B

  1. HOMEDRIVE+HOMEPATH
  2. USERPROFILE
  3. e$B%^%$e(B e$B%I%-%e%a%s%He(B
    e$B$r=g$KC5$7$Fe(BHOMEe$B$K%;%C%H$9$k$h$&$K$J$C$F$$$^$9!#e(B

ruby1.9e$B$,$C$F$3$H$G$9$Me(B?

e$B$=$&$9$k$He(B,
e$B$o$6$o$6e(Birbe$B$GBP1~$9$kI,MW$O$J$$$C$F$3$H$K$J$k$J$"$!e(B.

__
---------------------------------------------------->> e$B@PDMe(B
e$B7=<ye(B <<—
---------------------------------->> e-mail: removed_email_address@domain.invalid <<—


#5

e$B$1$$$8$e!w$$$7$D$+$G$9e(B.

In [ruby-dev:28704] the message: “[ruby-dev:28704] Re: irb/init.rb
code suggestion to find user’s home directory in windows”, on Jun/09
15:11(JST) removed_email_address@domain.invalid writes:

e$B$J$+$@$G$9!#e(B

ruby1.9e$B$,$C$F$3$H$G$9$Me(B?
e$B$G$9!#e(B

e$BN;2re(B.

e$B$=$&$9$k$He(B, e$B$o$6$o$6e(Birbe$B$GBP1~$9$kI,MW$O$J$$$C$F$3$H$K$J$k$J$"$!e(B.
e$B$b$H$b$H$N%j%/%(%9%H$Oe(B1.9e$B$GBP1~$7$F$[$7$$$C$F$3$H$J$s$G$7$g$&$+!#e(B
e$B$=$l$H$be(B1.8e$B$K$b%P%C%/%]!<%H$7$h$&$H$$$&$3$H$G$7$g$&$+!#e(B

e$B$$$d!<e(B. e$B$=$3$^$G$d$j<h$j$7$F$$$J$$$H$$$&$+e(B,
e$B=PMh$J$$$N$Ge(B(^^;;;

e$B0l1~%j%/%(%9%HE*$K$Oe(B,
e$B8=9T%P!<%8%g%s$Ne(Birbe$B$G$C$F$3$H$J$N$G$7$g$&$,e(B, e$B0le(B
e$B1~e(B, irbe$B$K$b2sHr:v$,$j$^$9$7e(B, ruby1.9e$B$GBP1~$9$k$J$ie(B,
e$B$o$6$o$6e(B
ruby(/irb)1.8e$B$GBP1~$9$kI,MW$O$=$l$[$I$J$$$H;W$$$^$9e(B.

e$B$^$"e(B,
ruby2.0e$B$,$I$N$/$i$$@h$K$J$k$+$C$FOC$K$b$h$k$s$G$7$g$&$,e(B…

__
---------------------------------------------------->> e$B@PDMe(B
e$B7=<ye(B <<—
---------------------------------->> e-mail: removed_email_address@domain.invalid <<—


#6

e$B$J$+$@$G$9!#e(B

At Fri, 9 Jun 2006 13:18:51 +0900,
e$B@PDM7=<ye(B wrote in [ruby-dev:28703]:

e$B4D6-8GM-$N$b$N$J$N$G!"e(Birbe$B$GBP1~$9$k$N$O$A$g$C$H0c$&$h$&$Je(B
e$B5$$b$7$J$/$O$J$$$N$G$9$,!#$A$J$_$Ke(B1.9e$B$G$O!"e(BHOMEe$B$,L$Dj5A$J$ie(B

  1. HOMEDRIVE+HOMEPATH
  2. USERPROFILE
  3. e$B%^%$e(B e$B%I%-%e%a%s%He(B
    e$B$r=g$KC5$7$Fe(BHOMEe$B$K%;%C%H$9$k$h$&$K$J$C$F$$$^$9!#e(B

ruby1.9e$B$,$C$F$3$H$G$9$Me(B?

e$B$G$9!#e(B

e$B$=$&$9$k$He(B, e$B$o$6$o$6e(Birbe$B$GBP1~$9$kI,MW$O$J$$$C$F$3$H$K$J$k$J$"$!e(B.

e$B$b$H$b$H$N%j%/%(%9%H$Oe(B1.9e$B$GBP1~$7$F$[$7$$$C$F$3$H$J$s$G$7$g$&$+!#e(B
e$B$=$l$H$be(B1.8e$B$K$b%P%C%/%]!<%H$7$h$&$H$$$&$3$H$G$7$g$&$+!#e(B