command-line: executable symbol isn't needed, vm-path is better

char-rename
Björn Lindqvist 2016-09-25 23:37:04 +02:00
parent e32e45e590
commit da670c053f
2 changed files with 4 additions and 11 deletions

View File

@ -1,5 +1,4 @@
USING: help.markup help.syntax parser vocabs.loader strings USING: help.markup help.syntax strings system vocabs vocabs.loader ;
vocabs ;
IN: command-line IN: command-line
HELP: run-bootstrap-init HELP: run-bootstrap-init
@ -25,15 +24,11 @@ HELP: (command-line)
{ $values { "args" "a sequence of strings" } } { $values { "args" "a sequence of strings" } }
{ $description "Outputs the raw command line parameters which were passed to the Factor VM on startup." { $description "Outputs the raw command line parameters which were passed to the Factor VM on startup."
$nl $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 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 } "." } { $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 } ; { $see-also vm-path } ;
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 } ;
HELP: main-vocab-hook 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)." } ; { $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)." } ;

View File

@ -18,7 +18,6 @@ M: user-init-error error-file path>> ;
M: user-init-error error-line line#>> ; M: user-init-error error-line line#>> ;
M: user-init-error error-type drop +user-init-error+ ; M: user-init-error error-type drop +user-init-error+ ;
SYMBOL: executable
SYMBOL: script SYMBOL: script
SYMBOL: command-line SYMBOL: command-line
@ -81,8 +80,7 @@ SYMBOL: command-line
: parse-command-line ( args -- ) : parse-command-line ( args -- )
command-line off command-line off
script off script off
unclip executable set rest (parse-command-line) ;
(parse-command-line) ;
SYMBOL: main-vocab-hook SYMBOL: main-vocab-hook