-
Notifications
You must be signed in to change notification settings - Fork 520
Create community_snippets.md for user created snippets #1246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@tylerl0706 Checked against my local snippet on my current machine and this is the PSCustomObject snippet that I use.
"PSCustomObject": {
"prefix": "PSCustomObject",
"body": [
"[PSCustomObject]@{\r",
"\t${item1} = ${Property1}\r",
"\t${item2} = ${Property2}\r",
"\t${item3} = ${Property3}\r",
"\t${item4} = ${Property4}\r",
"}"
],
"description": "Creates a PSCustomObject"
}
I presume there'd be a debate around how many default properties to include but any fewer than 4 and I'd likely just use Select-Object in most cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea!
This is for the snippets that are great at particular things that are a bit too specific to be shipped in the extension itself.
A great example would be these argument completion snippets (#1212) submitted by @powercode.
If anyone wants to give me some snippets to start out with, send them my way here 😄