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?
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
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.
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With