Quantcast
Channel: Active questions tagged windows - Super User
Viewing all articles
Browse latest Browse all 10660

How can I have a colored Powershell prompt and still have conda env label?

$
0
0

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:


Viewing all articles
Browse latest Browse all 10660

Trending Articles