When I add the code below to C:\Users\USERFOLDER\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
:
function prompt { $ESC = [char]27"$ESC[46mPS $($executionContext.SessionState.Path.CurrentLocation)$('>' * ($nestedPromptLevel + 1)) $ESC[0m" }
(as suggested in How to colorize the Powershell prompt?)
My prompt then omits conda's environment prefix (e.g. base
), despite the environment being activated.
How can I have a colored prompt but still keep conda's prefix?
Other related questions that do not answer mine: