prefix-dev / pixi

Package management made easy
https://pixi.sh
BSD 3-Clause "New" or "Revised" License
3.04k stars 168 forks source link

Add support of PS1 in pixi shell-hook #1275

Open nichmor opened 5 months ago

nichmor commented 5 months ago

Problem description

Similar how pixi shell can alter your PS1 I think it would be great to allow pixi shell-hook to change PS1. We can have the same --change-ps1 that by default will be false - to not introduce any breaking changes. Or even allow to customize the text for it

ruben-arts commented 4 months ago

I think it shouldn't be to hard as we can already generate the prompt in the prompt.rs so it would just be adding it to the shell-hook as well.

pypeaday commented 4 months ago

Question about this issue - would this support allow me to disable pixi shell changing PS1? I use starship and just hopped into a pixi shell and now I have (pixi_py) above my typical starship prompt (which shows me a conda env activated anyways from being in the pixi shell). I'd love to turn this off if possible!

Pic for example (fonts in VS Code terminal are borked right now... please ignore :D)

image

pypeaday commented 4 months ago

turns out I can just unset PS1... literally didn't know what that was until this morning

ruben-arts commented 4 months ago

Great, that you found a work around, you can also set the change-ps1 = false in your ~/.config/pixi/config.toml so that pixi will never touch it again.

corneliusroemer commented 3 months ago

Would be nice to discover users of starship and the prompt modification that pixi does is really annoying.

Maybe you could make the prompt modification opt in rather than opt out?

Hyper 2024-07-04 01 12 29