This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a PSake script that supports the following tasks: | |
# clean, build, test and publish. The default task is build. | |
# | |
# The publish task uses the Publish-Module command to publish | |
# to either the PowerShell Gallery (the default) or you can change | |
# the $Repository property to the name of an alternate repository. | |
# | |
# The test task invokes Pester to run any Pester tests in your | |
# workspace folder. Name your test scripts <TestName>.Tests.ps1 | |
# and Pester will find and run the tests contained in the files. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Condition statement": { | |
"prefix": "cond", | |
"body": [ | |
"$1 { $0; break }" | |
], | |
"description": "Switch condition statement" | |
}, | |
"Condition single quoted string statement": { | |
"prefix": "condsqstr", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Other hosts (ISE, ConEmu) don't always work as well with PSReadLine. | |
# Also, if PS is run with -Command, PSRL loading is suppressed. | |
$psrlMod = Get-Module PSReadLine | |
if (($null -eq $psrlMod) -or ($host.Name -eq 'Windows PowerShell ISE Host')) { | |
return | |
} | |
elseif ($psrlMod.Version.Major -lt 2) { | |
throw "PSReadLine 1.x installed or not imported, import PSRL or ugprade to at least 2.x." | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Certains console exes have a tendency to bork the console colors - looking at you | |
# MSBuild.exe. Either copy/paste this into your profile.ps1 file or dot source it. | |
$script:origBgColor = $host.ui.rawui.BackgroundColor | |
$script:origFgColor = $host.ui.rawui.ForegroundColor | |
function Reset-Colors | |
{ | |
$host.ui.rawui.BackgroundColor = $origBgColor | |
$host.ui.rawui.ForegroundColor = $origFgColor | |
} |
NewerOlder