Closed wolfv closed 8 months ago
I think I had to add a line to my .bashrc
with pixi 0.4 to get the prompt to work:
export PS1="${PIXI_PROMPT}${PS1}"
Once this issue is closed will I be able to remove that last bit of pixi-specific code in my .bashrc
?
@twrightsman You should be ablt to loose that export as that is also specified in src/cli/mod.rs
So as long as you add the completion script to the .bashrc
you'll have all the featuers.
eval "$(pixi completion --shell bash)"
I removed the export PS1
command above from my .bashrc
and tested it with pixi 0.5, but the prompt doesn't update with the environment name. I do see source /tmp/pixi_env_H01.sh
now in my history though, which is new.
Edit: Ah, I see the snippet @ruben-arts linked to is the completion installation script. I'd like to not have anything in my .bashrc
, even completions.
Ah yeah that is not possible yet.
This is now working for all the above mentioned prompts + xonsh
so this issue is closed :tada:
more info; https://github.com/prefix-dev/pixi/blob/main/src/prompt.rs
Problem description
We are setting the PS1 in different ways:
PS pixi >
(pixi) >
PS1=$PIXI_PROMPT$PS1
I think we should find a way to add
$PIXI_PROMPT
to the different PS1 mechanisms.