]> gitweb.factorcode.org Git - factor.git/commitdiff
command-line: executable symbol isn't needed, vm-path is better
authorBjörn Lindqvist <bjourne@gmail.com>
Sun, 25 Sep 2016 21:37:04 +0000 (23:37 +0200)
committerBjörn Lindqvist <bjourne@gmail.com>
Sun, 25 Sep 2016 21:37:04 +0000 (23:37 +0200)
basis/command-line/command-line-docs.factor
basis/command-line/command-line.factor

index 8b49df4ef37208b11bee4427127ae9de4291b9d1..065349f747203bf1598f5db4356d0f355c816153 100644 (file)
@@ -1,5 +1,4 @@
-USING: help.markup help.syntax parser vocabs.loader strings
-vocabs ;
+USING: help.markup help.syntax strings system vocabs vocabs.loader ;
 IN: command-line
 
 HELP: run-bootstrap-init
@@ -25,15 +24,11 @@ HELP: (command-line)
 { $values { "args" "a sequence of strings" } }
 { $description "Outputs the raw command line parameters which were passed to the Factor VM on startup."
 $nl
-"We recommend using the " { $link executable } " and " { $link command-line } " symbols instead." } ;
+"We recommend using the " { $link vm-path } " and " { $link command-line } " symbols instead." } ;
 
 HELP: command-line
 { $var-description "When Factor is run with a script, this variable contains the list of command line arguments which follow the name of the script on the command line. In deployed applications, it contains the full list of command line arguments. In all other cases it is set to " { $link f } "." }
-{ $see-also executable } ;
-
-HELP: executable
-{ $var-description "Provides the path to the executable binary, typically Factor.  However, in a deployed application this will be the path to the deployed binary that is being executed." }
-{ $see-also command-line } ;
+{ $see-also vm-path } ;
 
 HELP: main-vocab-hook
 { $var-description "Global variable holding a quotation which outputs a vocabulary name. UI backends set this so that the UI can automatically start if the prerequisites are met (for example, " { $snippet "$DISPLAY" } " being set on X11)." } ;
index 9d4ccda7f3b92a9f418fec94a38a1e8e0f932673..aeb26c8e5e29336faf73b7389e4d468c4d734aff 100644 (file)
@@ -18,7 +18,6 @@ M: user-init-error error-file path>> ;
 M: user-init-error error-line line#>> ;
 M: user-init-error error-type drop +user-init-error+ ;
 
-SYMBOL: executable
 SYMBOL: script
 SYMBOL: command-line
 
@@ -81,8 +80,7 @@ SYMBOL: command-line
 : parse-command-line ( args -- )
     command-line off
     script off
-    unclip executable set
-    (parse-command-line) ;
+    rest (parse-command-line) ;
 
 SYMBOL: main-vocab-hook