allow git prompt status opt out for powershell and bash

This commit is contained in:
Dax T. Games
2019-11-09 16:36:16 -05:00
parent 44bc089ee4
commit 3ee244e4c1
2 changed files with 34 additions and 5 deletions

View File

@ -32,7 +32,11 @@ function checkGit($Path) {
if($env:gitLoaded -eq 'false') {
$env:gitLoaded = Import-Git
}
Write-VcsStatus
if (getGitStatusSetting -eq $true) {
Write-VcsStatus
}
return
}
$SplitPath = split-path $path
@ -41,4 +45,12 @@ function checkGit($Path) {
}
}
function getGitStatusSetting() {
$gitStatus = (git config cmder.status) | out-string
if (($gitStatus -replace "`n" -replace "`r") -eq "false") {
return $false
} else {
return $true
}
}