Skip to content

Commit

Permalink
Reset ForegroundColor in example prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlbyk committed Dec 1, 2010
1 parent 341e65e commit 02956e1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions GitPrompt.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# http://www.markembling.info/view/my-ideal-powershell-prompt-with-git-integration

$global:GitPromptSettings = New-Object PSObject -Property @{
DefaultForegroundColor = $Host.UI.RawUI.ForegroundColor

BeforeText = ' ['
BeforeForegroundColor = [ConsoleColor]::Yellow
BeforeBackgroundColor = $Host.UI.RawUI.BackgroundColor
Expand Down
3 changes: 3 additions & 0 deletions profile.example.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ Import-Module .\posh-git

# Set up a simple prompt, adding the git prompt parts inside git repos
function prompt {
# Reset color, which can be messed up by Enable-GitColors
$Host.UI.RawUI.ForegroundColor = $GitPromptSettings.DefaultForegroundColor

Write-Host($pwd) -nonewline

# Git Prompt
Expand Down

0 comments on commit 02956e1

Please sign in to comment.