"~" global var replaced by home word
parent
271d0e30f3
commit
61d4eeb633
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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 ;
|
||||||
|
|
|
@ -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* ;
|
||||||
|
|
Loading…
Reference in New Issue