File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 165165 "prefix" : " foreach-progress" ,
166166 "description" : " Insert a foreach loop with Write-Progress initialized" ,
167167 "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" ,
170171 " \\ $i = 1" ,
171172 " foreach ($${2:item} in $${1:array}) {" ,
172173 " \\ $progPercent = \" {0:n2}\" -f ([math]::round(\\ $i/\\ $total,4) * 100)" ,
670671 " }"
671672 ]
672673 }
673- }
674+ }
You can’t perform that action at this time.
0 commit comments