File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 165
165
"prefix" : " foreach-progress" ,
166
166
"description" : " Insert a foreach loop with Write-Progress initialized" ,
167
167
"body" : [
168
- " \\ $progPercent = \" {0:n2}\" -f ([math]::round(\\ $i/\\ $array.count,4) * 100)" ,
169
- " Write-Progress -Activity \" ${3:activityName}\" -Status \"\\ $i of \\ $array.count - \\ $progPercent% Complete:\" -PercentComplete \\ $progPercent" ,
168
+ " \\ $total = \\ $${1:array}.count" ,
169
+ " \\ $progPercent = \" {0:n2}\" -f ([math]::round(\\ $i/\\ $total,4) * 100)" ,
170
+ " Write-Progress -Activity \" ${3:activityName}\" -Status \"\\ $i of \\ $total - \\ $progPercent% Complete:\" -PercentComplete \\ $progPercent" ,
170
171
" \\ $i = 1" ,
171
172
" foreach ($${2:item} in $${1:array}) {" ,
172
173
" \\ $progPercent = \" {0:n2}\" -f ([math]::round(\\ $i/\\ $total,4) * 100)" ,
670
671
" }"
671
672
]
672
673
}
673
- }
674
+ }
You can’t perform that action at this time.
0 commit comments