Currently there is no way to access the script-name within a scriptlet. A common use-case would be CLI-usage printing. The shell launcher should capture the script name and expose it as an environment variable. Usage example (as suggested in #195): ```kotlin println("Usage: ${System.getenv("KSCRIPT_FILE")} [-ae] [--foo] file+") ```
Activity
Expose script file name to script itself
Expose script file name to script itself
Expose script file name to script (#200)
holgerbrandl commentedon Dec 7, 2018
Fixed by PR