# Author: Toni Schranz # License: feel free to edit and redistribute Import-Module posh-git function Prompt { # Custom color for Windows console if ( $Host.Name -eq "ConsoleHost" ) { $GitPromptSettings.EnableWindowTitle = 'PowerShell ' $GitPromptSettings.DefaultPromptSuffix = ' $' $GitPromptSettings.DefaultPromptPrefix = ' : ' Write-Prompt ' ' Write-Prompt $([Environment]::UserDomainName) -ForegroundColor DarkMagenta Write-Prompt '\' -ForegroundColor White Write-Prompt $([Environment]::UserName) -ForegroundColor Blue Write-Prompt " @ " -ForegroundColor Yellow $prompt = Write-Prompt $env:ComputerName -ForegroundColor Green $prompt += & $GitPromptScriptBlock if ($prompt) { "$prompt " } else { " " } } else { $promptString = ": " + $(Get-Location) + " >" Write-Host $([Environment]::UserDomainName) -NoNewline -ForegroundColor DarkMagenta Write-Host '\' -NoNewline -ForegroundColor White Write-Host $([Environment]::UserName) -NoNewline -ForegroundColor Blue Write-Host " @ " -NoNewline -ForegroundColor Yellow Write-Host $env:ComputerName -NoNewline -ForegroundColor Green Write-Host $promptString -NoNewline -ForegroundColor Yellow } return " " } # Chocolatey profile $ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" if (Test-Path($ChocolateyProfile)) { Import-Module "$ChocolateyProfile" }