"~" global var replaced by home word

slava 2006-09-30 00:45:24 +00:00
parent 271d0e30f3
commit 61d4eeb633
4 changed files with 6 additions and 4 deletions

View File

@ -5,7 +5,7 @@ USING: arrays definitions errors io kernel listener math
namespaces parser prettyprint sequences strings words shells ; namespaces parser prettyprint sequences strings words shells ;
: jedit-server-info ( -- port auth ) : jedit-server-info ( -- port auth )
"~" get "/.jedit/server" path+ <file-reader> [ home "/.jedit/server" path+ <file-reader> [
readln drop readln drop
readln string>number readln string>number
readln string>number readln string>number

View File

@ -9,7 +9,6 @@ namespaces parser threads words ;
cell \ cell set cell \ cell set
millis init-random millis init-random
init-io init-io
"HOME" os-env [ "." ] unless* "~" set
init-error-handler init-error-handler
init-threads init-threads
default-cli-args default-cli-args

View File

@ -6,12 +6,12 @@ parser sequences strings ;
: run-bootstrap-init ( -- ) : run-bootstrap-init ( -- )
"user-init" get [ "user-init" get [
"~" get "/.factor-boot-rc" append ?run-file home ".factor-boot-rc" path+ ?run-file
] when ; ] when ;
: run-user-init ( -- ) : run-user-init ( -- )
"user-init" get [ "user-init" get [
"~" get "/.factor-rc" append ?run-file home ".factor-rc" path+ ?run-file
] when ; ] when ;
: cli-var-param ( name value -- ) swap set-global ; : cli-var-param ( name value -- ) swap set-global ;

View File

@ -49,3 +49,6 @@ DEFER: directory.
: directory. ( path -- ) : directory. ( path -- )
dup directory [ file. ] each-with ; dup directory [ file. ] each-with ;
: home ( -- dir )
windows? "USERPROFILE" "HOME" ? os-env [ "." ] unless* ;