Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e704ce5

Browse files
rschaeferhigTylerLeonhardt
authored andcommitted
Added snippets (#1234)
Added snippets for PSCustomObject and Hashtable Fixes #1186
1 parent a838cf5 commit e704ce5

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

‎snippets/PowerShell.json‎

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,5 +913,23 @@
913913
"body": [
914914
"[Diagnostics.CodeAnalysis.SuppressMessageAttribute('${1:PSProvideDefaultParameterValue}', '', Scope='Function', Target='${2:*}')]"
915915
]
916-
}
916+
},
917+
"PSCustomObject": {
918+
"prefix": "PSCustomObject",
919+
"body": [
920+
"[PSCustomObject]@{",
921+
"\t${1:Name} = ${2:Value}",
922+
"}"
923+
],
924+
"description": "Creates a PSCustomObject"
925+
},
926+
"Hashtable": {
927+
"prefix": "Hashtable",
928+
"body": [
929+
"\\$${1:Var} = @{",
930+
"\t${2:Name} = ${3:Value}",
931+
"}"
932+
],
933+
"description": "Creates a Hashtable"
934+
}
917935
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /