Skip to content

feat: Support Bash on Windows using 'pixi shell' #3981

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mwiebe
Copy link
Contributor

@mwiebe mwiebe commented Jun 20, 2025

This depends on the PR conda/rattler#1392 for the bash shell hook to work correctly on Windows.

Create a function start_winbash for running bash on Windows that launches bash using the command:

$ bash --init-file <temp-shell-hook> -i

Here's an example output where I've built pixi against the rattler PR rebased to an older rattler commit that is compatible with the pixi main branch:

mw@Home MINGW64 /c/Dev/pixi (win-git-bash)
$ echo $PATH
/c/Users/mw/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/mw/bin:...

mw@Home MINGW64 /c/Dev/pixi (win-git-bash)
$ ./target/debug/pixi.exe shell
(pixi)
mw@Home MINGW64 /c/Dev/pixi (win-git-bash)
$ echo $PATH
/c/Dev/pixi/.pixi/envs/default:/c/Dev/pixi/.pixi/envs/default/Library/mingw-w64/bin:
/c/Dev/pixi/.pixi/envs/default/Library/usr/bin:/c/Dev/pixi/.pixi/envs/default/Library/bin:
/c/Dev/pixi/.pixi/envs/default/Scripts:/c/Dev/pixi/.pixi/envs/default/bin:/c/Users/mw/bin:...
(pixi)
mw@Home MINGW64 /c/Dev/pixi (win-git-bash)
$ echo $CONDA_PREFIX
C:\Dev\pixi\.pixi\envs\default

@mwiebe mwiebe force-pushed the win-git-bash branch 7 times, most recently from d7ef829 to 1310559 Compare June 26, 2025 06:44
This depends on the PR conda/rattler#1392
for the bash shell hook to work correctly on Windows.

Create a function start_winbash for running bash on Windows
that launches bash using the command:

$ bash --init-file <temp-shell-hook> -i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant