Suggestion for additional usage examples
glennj opened this issue · 3 comments
glennj commented
Using the current shell idiom to launch a script with it's interpreter:
$ cat > greet.wren
#!/usr/bin/env wrenc
System.print("Hello World!")
$ wrenc greet.wren
Hello World!
$ chmod u+x greet.wren
$ ./greet.wren
Hello World!
$ cat > args.wren
#!/usr/bin/env wrenc
import "os" for Process
System.print(Process.arguments)
System.print(Process.allArguments)
$ chmod u+x args.wren
$ ./args.wren foo bar baz "with spaces"
[foo, bar, baz, with spaces]
[wrenc, ./args.wren, foo, bar, baz, with spaces]
glennj commented
Luckily the shebang is valid in wren as an annotation
glennj commented
Oops, wrong repo
joshgoebel commented
Please be sure not to confuse the wren-cli and wren-console projects. :-)