From da670c053fc6f96fed4cb3f76615ce212e000abf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Lindqvist?= Date: Sun, 25 Sep 2016 23:37:04 +0200 Subject: [PATCH] command-line: executable symbol isn't needed, vm-path is better --- basis/command-line/command-line-docs.factor | 11 +++-------- basis/command-line/command-line.factor | 4 +--- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/basis/command-line/command-line-docs.factor b/basis/command-line/command-line-docs.factor index 8b49df4ef37..065349f7472 100644 --- a/basis/command-line/command-line-docs.factor +++ b/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 @@ -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)." } ; diff --git a/basis/command-line/command-line.factor b/basis/command-line/command-line.factor index 9d4ccda7f3b..aeb26c8e5e2 100644 --- a/basis/command-line/command-line.factor +++ b/basis/command-line/command-line.factor @@ -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