Browse files

Add $GitPromptSettings.EnablePromptStatus

  • Loading branch information...
1 parent 2b3269f commit c3568766dd05fd65f331f83dffa3c57a4586a9e7 @dahlbyk committed Aug 28, 2010
Showing with 7 additions and 3 deletions.
  1. +2 −0 GitPrompt.ps1
  2. +5 −3 profile.example.ps1
View
2 GitPrompt.ps1
@@ -35,6 +35,8 @@ $global:GitPromptSettings = New-Object PSObject -Property @{
ShowStatusWhenZero = $true
AutoRefreshIndex = $true
+
+ EnablePromptStatus = $true
}
function Write-GitStatus($status) {
View
8 profile.example.ps1
@@ -13,9 +13,11 @@ function prompt {
Write-Host($pwd) -nonewline
# Git Prompt
- $Global:GitStatus = Get-GitStatus
- Write-GitStatus $GitStatus
-
+ if($Global:GitPromptSettings.EnablePromptStatus) {
+ $Global:GitStatus = Get-GitStatus
+ Write-GitStatus $GitStatus
+ }
+
return "> "
}

0 comments on commit c356876

Please sign in to comment.