diff --git a/README.md b/README.md index 7c9b2d4..cabab4f 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,10 @@ Just a few snippets to make shellscript dev easier - until : until - main : main - const : const +- array : array definition +- forarray: for loop on array elements +- forindex: for loop on array by index +- randinrange: use shuf to generate integer in range - todo : TODO ## Known Issues diff --git a/snippets/snippets.code-snippets b/snippets/snippets.code-snippets index a5b347d..caa9710 100644 --- a/snippets/snippets.code-snippets +++ b/snippets/snippets.code-snippets @@ -128,5 +128,11 @@ "done" ], "description": "Creates a loop echoing all indexes in a range" + },"randinrange": { + "prefix": "randinrange", + "body": [ + "shuf -i ${0:start}-${1:end} -n 1" + ], + "description": "Creates a loop echoing all indexes in a range" } }