 ! 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 parser system vocabs.loader ;
+USING: combinators command-line continuations debugger eval io
+io.pathnames kernel layouts math math.parser namespaces parser
+sequences system vocabs.loader ;
 IN: command-line.startup
 
 : help? ( -- ? )

        [
            load-vocab-roots
            run-user-init
            "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
            ] if


: version? ( -- ? ) "version" get ;

: listener-restarts ( quot -- )
    [
        restarts get empty? embedded? or
        [ rethrow ] [ print-error-and-restarts "q" on "listener" run ] if
    ] recover ; inline

: command-line-startup ( -- )
    (command-line) parse-command-line {
        { [ help? ] [ help. ] }
