From 3c5ae4171249753e7f15155b43b40b3b43fd2f75 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sat, 4 Jun 2022 20:15:39 +0300 Subject: [PATCH] examples: simplify the shebang in the v_script.vsh example --- examples/v_script.vsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/v_script.vsh b/examples/v_script.vsh index 121b13e48..cebb3f007 100755 --- a/examples/v_script.vsh +++ b/examples/v_script.vsh @@ -1,9 +1,13 @@ -#!/usr/local/bin/v run +#!/usr/local/bin/v // The shebang above associates the file to V on Unix-like systems, // so it can be run just by specifying the path to the file // once it's made executable using `chmod +x`. +// Note that you can also use: `#!/usr/bin/env -S v crun`, if your system supports the -S flag to env +// The benefit is that in this case, v could be anywhere in your path, while /usr/bin/env is guaranteed +// to be present on most Unix systems in that exact place. + for _ in 0 .. 3 { println('V script') } -- 2.30.2