Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions snippets/snippets.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}