Skip to content
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

Create community_snippets.md for user created snippets #1246

Merged
merged 2 commits into from
Apr 24, 2018

Conversation

TylerLeonhardt
Copy link
Member

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 😄

@brettmillerb
Copy link
Contributor

@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.

Copy link
Contributor

@rjmholt rjmholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome.

Copy link
Contributor

@rkeithhill rkeithhill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea!

@TylerLeonhardt TylerLeonhardt merged commit 930c33d into master Apr 24, 2018
@TylerLeonhardt TylerLeonhardt deleted the snippets-docs branch April 24, 2018 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants