Native shebang: Difference between revisions

Content added Content deleted
Line 557: Line 557:
{{out}}
{{out}}
<pre>hello, world</pre>
<pre>hello, world</pre>
===Using a nim.cfg===
===Using a nim.cfg and/or nim r===
Alternatively, put those pesky extra arguments in a nim config file
Alternatively, accept all the compiler messages, or create a nim.cfg that silences them:


'''File: nim.cfg'''
'''File: nim.cfg'''
<lang nim>--hints:off
<lang nim>--hints:off</lang>
--run</lang>
'''File: nativeshebang2.nims'''
'''File: nativeshebang2.nims'''
<lang nim>#!/path/to/nim c
<lang nim>#!/path/to/nim r
import os,strutils
import os,strutils
echo commandLineParams().join(" ")</lang>
echo commandLineParams().join(" ")</lang>