Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undo Conda Powershell prompt modification

Conda 4.6.14 over-writes my default PowerShell prompt from:

C:\whatevs\okay>

to:

(env) PS>

but I ideally want what it was previously:

(env) C:\whatevs\okay>

How can I undo this change to my PowerShell prompt? I like knowing what path and Conda environment I'm using whenever I execute a command! Is there a setting I can change?

I know it's possible to modify the PowerShell prompt by editing $profile. However, I want to keep the (env). Is there some quick way to get the current Conda environment so I can include it into a custom path?

Details

The file being modified by conda init is $HOME\Documents\WindowsPowerShell\profile.ps1 who's contents are:

#region conda initialize
# !! Contents within this block are managed by 'conda init' !!
(& "C:\Users\user\Anaconda3\Scripts\conda.exe" "shell.powershell" "hook") | Out-String | Invoke-Expression
#endregion
like image 438
Seanny123 Avatar asked Apr 30 '19 15:04

Seanny123


People also ask

How do I change the powershell prompt?

To customize the prompt, write a new Prompt function. The function is not protected, so you can overwrite it. Then, between the braces, enter the commands or the string that creates your prompt. The following Prompt function displays the history ID of the next command.


1 Answers

This is an issue with Conda 4.6.14 and can be resolved by downgrading back to 4.6.12 or upgrade to the (currently) experimental 4.7.

like image 188
Seanny123 Avatar answered Oct 06 '22 21:10

Seanny123