-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prompt not displaying in pixi shell #384
Comments
This is indeed a result of the change in how the shell works. You can do Going to look into it asap, as this is properly broken. |
Also a really nice improvement would be to use starship.rs, they have a really nice integration for conda aswell! |
Found a way that works, but its not the shortest. # Avoid overwriting other prompt commands (like the one from starship.rs).
if [[ -z $PROMPT_COMMAND ]]; then
# Get original PS1
export ORIG_PS1="${ORIG_PS1:-$PS1}";
# Set the PROMPT_COMMAND to generate the prompt everytime before the prompt is created.
export PROMPT_COMMAND='PS1="${PIXI_PROMPT}${ORIG_PS1}"'
fi |
I tried the workaround but it broke the Conda prompt, just a heads up 😄 |
@twrightsman Ah thanks for testing, I'm not sure what the issue is. Could you share the result you get in your terminal? |
Ah @baszalmstra correctly noted that you are talking about the above mentioned workaround, and not the PR I've been working on. Assuming the conda activation also updates the |
Sorry for the confusion @ruben-arts ! Yes, looking foward to #385 merging |
Depends on conda/rattler#375 to build Changes the way the shell prompts are overwriten. These are now hard coded scripts per shell implementation. Closes #384 --------- Co-authored-by: Bas Zalmstra <[email protected]>
Previously the prompt wouldn't update if you changed dir. This now reruns the prompt every time it prints Closes #384
Thanks so much @ruben-arts! v0.6.0 works great |
Checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pixi, using
pixi --version
.Reproducible example
With
export PS1="${PIXI_PROMPT}${PS1}"
in.bashrc
:Issue description
I assume this is because
$PIXI_PROMPT
is not defined when the.bashrc
is sourced, because it seems defined in the temp file sourced after the shell is started. Following this logic, runningpixi shell
twice leads to the prompt appearing:Expected behavior
The text was updated successfully, but these errors were encountered: