mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 01:44:37 +00:00
Merge pull request #5865 from adamchainz/doc_shebang
Documented shebang execution of Nimscripts
This commit is contained in:
@@ -108,3 +108,12 @@ installation of Nimble is done with this simple script:
|
||||
|
||||
mvFile "nimble" & $id & "/src/nimble".toExe, "bin/nimble".toExe
|
||||
|
||||
You can also use the shebang ``#!/usr/bin/env nim``, as long as your filename
|
||||
ends with ``.nims``:
|
||||
|
||||
.. code-block:: nim
|
||||
|
||||
#!/usr/bin/env nim
|
||||
mode = ScriptMode.Silent
|
||||
|
||||
echo "hello world"
|
||||
|
||||
Reference in New Issue
Block a user