Skip to content

Commit

Permalink
command-line: executable symbol isn't needed, vm-path is better
Browse files Browse the repository at this point in the history
  • Loading branch information
bjourne committed Sep 25, 2016
1 parent e32e45e commit da670c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
11 changes: 3 additions & 8 deletions basis/command-line/command-line-docs.factor
@@ -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
Expand All @@ -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)." } ;
Expand Down
4 changes: 1 addition & 3 deletions basis/command-line/command-line.factor
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down

1 comment on commit da670c0

@mrjbq7
Copy link
Member

@mrjbq7 mrjbq7 commented on da670c0 Sep 26, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tools.deploy.shaker seems to use it (just set-global) and also there were some command-line-tests.factor that depended on it too I think.

Please sign in to comment.