Skip to content

Commit

Permalink
feat(sh): forin snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
vEnhance committed Sep 7, 2024
1 parent e9b818d commit f2aaf53
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions vim/snips/sh.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,9 @@ readarray -t ${1:VAR_NAME} < <(${2:CMD})
${3:CMD} "$\{$1[@]\}"
$0
endsnippet

snippet forin "Loop over an array"
for ${1:needle} in "$\{${2:HAYSTACK}[@]\}" ; do
$0
done
endsnippet

0 comments on commit f2aaf53

Please sign in to comment.