vscode-powershell icon indicating copy to clipboard operation
vscode-powershell copied to clipboard

snippets/PowerShell.json missing '$' under try-catch

Open jmilliron808 opened this issue 3 years ago • 1 comments

Prerequisites

  • [X] I have written a descriptive issue title.
  • [X] I have searched all issues to ensure it has not already been reported.
  • [X] I have read the troubleshooting guide.
  • [X] I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • [X] I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • [ ] If this is a security issue, I have read the security issue reporting guidance.

Summary

The try-catch snippet is missing it's '$' for the first tab stop.

Line 609 in /snippets/PowerShell.json should be: "\t${1:<#Do this if a terminating exception happens#>}", Instead of: "\t{1:<#Do this if a terminating exception happens#>}",

PowerShell Version

PS> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.2.2
PSEdition                      Core
GitCommitId                    7.2.2
OS                             Microsoft Windows 10.0.19044
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visual Studio Code Version

PS> code --version
1.67.0
57fd6d0195bb9b9d1b49f6da5db789060795de47
x64

Extension Version

PS> code --list-extensions --show-versions | Select-String powershell

[email protected]

Steps to Reproduce

Type 'try-catch' > hit tab > the cursor moves to $0 cursor position

It should move to $1 tab stop but it's missing the '$'

Visuals

No response

Logs

No response

jmilliron808 avatar May 10 '22 15:05 jmilliron808

Good catch!

JustinGrote avatar May 10 '22 15:05 JustinGrote

@JustinGrote I can't remember, was this fixed?

andyleejordan avatar Nov 30 '22 20:11 andyleejordan

Probably not, I'll keep it on my free time to do list.

JustinGrote avatar Nov 30 '22 21:11 JustinGrote