-run=listener run terminal listener
-run=ui.tools run Factor development UI
-e=<code> evaluate <code>
+ -ea=<code> evaluate <code> with auto-use
-no-user-init suppress loading of .factor-rc
-roots=<paths> a list of path-delimited extra vocab roots
! Copyright (C) 2011 Joe Groff.
! See http://factorcode.org/license.txt for BSD license.
USING: combinators command-line eval io io.pathnames kernel
-layouts math math.parser namespaces system vocabs.loader ;
+layouts math math.parser namespaces parser system vocabs.loader ;
IN: command-line.startup
: help? ( -- ? )
-run=listener run terminal listener
-run=ui.tools run Factor development UI
-e=<code> evaluate <code>
+ -ea=<code> evaluate <code> with auto-use
-no-user-init suppress loading of .factor-rc
-datastack=<int> datastack size in KiB [" write cell 32 * number>string write "]
-retainstack=<int> retainstack size in KiB [" write cell 32 * number>string write "]
[
load-vocab-roots
run-user-init
- "e" get script get or [
+ "e" get "ea" get script get or or [
"e" get [ eval( -- ) ] when*
+ "ea" get [ t auto-use? [ eval( -- ) ] with-variable ] when*
script get [ run-script ] when*
] [
"run" get run
"\\"
"M\\"
"]"
+ "auto-use"
"delimiter"
"deprecated"
"f"
SYMBOL: auto-use?
-: auto-use ( -- ) auto-use? on ;
-
: no-word-restarted ( restart-value -- word )
dup word? [
dup vocabulary>>
"POSTPONE:" [ scan-word suffix! ] define-core-syntax
"\\" [ scan-word <wrapper> suffix! ] define-core-syntax
"M\\" [ scan-word scan-word lookup-method <wrapper> suffix! ] define-core-syntax
- "inline" [ last-word make-inline ] define-core-syntax
- "recursive" [ last-word make-recursive ] define-core-syntax
- "foldable" [ last-word make-foldable ] define-core-syntax
- "flushable" [ last-word make-flushable ] define-core-syntax
+ "auto-use" [ auto-use? on ] define-core-syntax
"delimiter" [ last-word t "delimiter" set-word-prop ] define-core-syntax
"deprecated" [ last-word make-deprecated ] define-core-syntax
+ "flushable" [ last-word make-flushable ] define-core-syntax
+ "foldable" [ last-word make-foldable ] define-core-syntax
+ "inline" [ last-word make-inline ] define-core-syntax
+ "recursive" [ last-word make-recursive ] define-core-syntax
"SYNTAX:" [
scan-new-word parse-definition define-syntax