We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2e8fdc9 commit 01cc9feCopy full SHA for 01cc9fe
snippets/PowerShell.json
@@ -166,9 +166,9 @@
166
"description": "Insert a foreach loop with Write-Progress initialized",
167
"body": [
168
"\\$total = \\$${1:array}.count",
169
+ "\\$i = 1",
170
"\\$progPercent = \"{0:n2}\" -f ([math]::round(\\$i/\\$total,4) * 100)",
171
"Write-Progress -Activity \"${3:activityName}\" -Status \"\\$i of \\$total - \\$progPercent% Complete:\" -PercentComplete \\$progPercent",
- "\\$i = 1",
172
"foreach ($${2:item} in $${1:array}) {",
173
" \\$progPercent = \"{0:n2}\" -f ([math]::round(\\$i/\\$total,4) * 100)",
174
" Write-Progress -Activity \"${3:activityName}\" -Status \"\\$i of \\$total - \\$progPercent% Complete:\" -PercentComplete \\$progPercent",
0 commit comments