Git Shell ignores the custom prompt in my powershell profile -
my powershell profile customizes prompt , background color.
$host.ui.rawui.backgroundcolor = 'red'; function prompt { write-host ("ps >") -nonewline -foregroundcolor magenta return " " }
when open powershell, both customizations work:
ps >
when open git shell, background color customization works background red, prompt isn't short.
c:\users\bigfont\documents\github>
...and then, if run . $profile
explicitly import profile, entire customization work.
ps >
how can make git shell change prompt without having explicitly import profile?
edits
# 1
running $profile | select *
results in
allusersallhosts : c:\windows\syswow64\windowspowershell\v1.0\profile.ps1 alluserscurrenthost : c:\windows\syswow64\windowspowershell\v1.0\microsoft.powershell_profile.ps1 currentuserallhosts : c:\users\bigfont\documents\windowspowershell\profile.ps1 currentusercurrenthost : c:\users\bigfont\documents\windowspowershell\microsoft.powershell_profile.ps1
# 2
running . $profile
override posh gits profile. want - need determine how without needing run . $profile
.
one of main features of posh-git changing prompt show additions, branch, etc. customizations running after yours , overwriting them.
by re-importing profile, may in fact undoing posh-git's prompt. see sure, re-import profile , cd
repo.
also check $profile | select *
see of profiles may in effect. may best edit posh-git's profile (even if dot source own).
edits
after reading edits, go ahead , edit each profile until find 1 posh-git running from. easy way launch profile in ise editor console host this:
ise $profile.allusersallhosts ise $profile.currentuserallhosts
(etc.)
note profiles may not exist. if don't exist won't able launch in ise, fine.
once find 1 posh-git making changes, dot source own file @ end.
alternatively, can delete file or comment whole thing out.
let me know if i'm making sense or if confusing.
Comments
Post a Comment