]> gitweb.factorcode.org Git - factor.git/commitdiff
syntax: add note to #! docs
authorJoe Groff <arcata@gmail.com>
Sun, 27 Nov 2011 23:03:40 +0000 (15:03 -0800)
committerJoe Groff <arcata@gmail.com>
Sun, 27 Nov 2011 23:03:40 +0000 (15:03 -0800)
core/syntax/syntax-docs.factor

index 81d24079b0c60b3ed973ab77b0cf6f763abba4d2..469ea33fd42b1b02ea803c9694d0a96f5fcb7e83 100644 (file)
@@ -657,9 +657,16 @@ HELP: !
 { POSTPONE: ! POSTPONE: #! } related-words
 
 HELP: #!
-{ $syntax "#! comment..." }
+{ $syntax "#!comment..." }
 { $values { "comment" "characters" } }
-{ $description "Discards all input until the end of the line." } ;
+{ $description "Discards all input until the end of the line." }
+{ $notes "To allow Unix-style \"shebang\" scripts to work as expected, " { $snippet "#!" } " is parsed as a separate token regardless of following whitespace if it appears at the beginning of a line."
+{ $example
+    "#!/usr/bin/env/factor"
+    "USING: io ;"
+    "\"Hello world\" print"
+    "Hello world"
+} } ;
 
 HELP: NAN:
 { $syntax "NAN: payload" }