From 2a585dadfc0815e6ffd00542318926a102b4a8ff Mon Sep 17 00:00:00 2001 From: Turiiya <34311583+ttytm@users.noreply.github.com> Date: Wed, 10 Apr 2024 02:48:00 +0200 Subject: [PATCH] Updated V for Bash script developers (markdown) --- V-for-Bash-script-developers.md | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/V-for-Bash-script-developers.md b/V-for-Bash-script-developers.md index 8400eec..e63d905 100644 --- a/V-for-Bash-script-developers.md +++ b/V-for-Bash-script-developers.md @@ -6,7 +6,7 @@ By doing so, v will make functions inside the os module automatically available You also will not need to specify the main function (that is a work in progress, for now, please do so ... simple linear examples work, but for now v scripting is more stable with a `fn main(){}` ). -To run your .vsh scripts, on *nix platforms, just set the executable bit for your script with for example `chmod +x script.vsh` . After that, you can start the script like any other executable, with `./script.vsh` . +To run your .vsh scripts, on \*nix platforms, just set the executable bit for your script with for example `chmod +x script.vsh` . After that, you can start the script like any other executable, with `./script.vsh` . On Windows, you have to associate the `.vsh` file extension with `v.exe` . After that, just double click your `script.vsh` file in Windows Explorer. @@ -14,33 +14,39 @@ On Windows, you have to associate the `.vsh` file extension with `v.exe` . After Hello World -
+
+```bash
 #!/usr/bin/env bash
 echo "Hello world"
-
+``` + -
+
+```v
 #!/usr/local/bin/v
 println('Hello World!')
-
+``` + - Listing files in current folder -
+
+```bash
 #!/usr/bin/env bash
 ls
-
+``` + -
+
+```v
 #!/usr/local/bin/v
 println(ls('.') ?)
-
+```