diff options
author | Adam Johnson <me@adamj.eu> | 2017-05-21 22:17:41 +0100 |
---|---|---|
committer | Adam Johnson <me@adamj.eu> | 2017-05-21 22:19:13 +0100 |
commit | 9ffed0de3f142a24dd52ec53cc7c2940c01cc54d (patch) | |
tree | 8829dc7182b532914dc8e1b8c39242a2950ca846 | |
parent | 2b8a1cee8cbeddb3e64193a59a78b5d0f46d2fda (diff) | |
download | Nim-9ffed0de3f142a24dd52ec53cc7c2940c01cc54d.tar.gz |
Documented shebang execution of Nimscripts
-rw-r--r-- | doc/nims.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/nims.rst b/doc/nims.rst index 967dd4149..d4ef0055f 100644 --- a/doc/nims.rst +++ b/doc/nims.rst @@ -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" |