From 9ffed0de3f142a24dd52ec53cc7c2940c01cc54d Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sun, 21 May 2017 22:17:41 +0100 Subject: [PATCH] Documented shebang execution of Nimscripts --- doc/nims.rst | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/nims.rst b/doc/nims.rst index 967dd41494..d4ef0055f8 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"