How can I reliably get the script name in Chicken Scheme?
It seems that -ss eats up the script name, so it's not visible unless I use dot slash to run my scripts.
scriptedmain.scm:
#!/usr/bin/env csi -q
(display (command-line-arguments))
(display "\n")
(exit)
Trace:
$ ./scriptedmain.scm
(-q ./scriptedmain.scm)
wonko:Desktop andrew$ csi -ss scriptedmain.scm
()
This is a late response, so may not be of use to the original poster. But to any others who may come across this question, the simple answer is to use the parameter:
This should return the correct name for all situations. Docs here.