Skip to content

Instantly share code, notes, and snippets.

@erenard
Created August 22, 2019 09:07
Show Gist options
  • Save erenard/3f98a3b3862cf621f9eda321dcd7215f to your computer and use it in GitHub Desktop.
Save erenard/3f98a3b3862cf621f9eda321dcd7215f to your computer and use it in GitHub Desktop.
Powershell configuration for chocolatey, git and npm
Import-Module posh-git
Import-Module TabExpansionPlusPlus
Import-Module NPMTabCompletion
# Set up a simple prompt, adding the git prompt parts inside git repos
function global:prompt {
$realLASTEXITCODE = $LASTEXITCODE
Write-Host($pwd.ProviderPath) -nonewline -ForegroundColor green
Write-VcsStatus
$global:LASTEXITCODE = $realLASTEXITCODE
return "`n> "
}
# SSH startup
Start-SshAgent -Quiet
# Chocolatey profile
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
if (Test-Path($ChocolateyProfile)) {
Import-Module "$ChocolateyProfile"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment