Is there a recommended way to find the script path...
# scripting
p
Is there a recommended way to find the script path? I found this way:
Copy code
System.getProperties()["sun.java.command"].toString().split(" ").let {
    it[it.indexOfLast { item -> item == "-script" } + 1]
}
but it’s not handling well escaped spaces + quite verbose. In Python you would find it with
sys.argv[0]
1