Skip to content
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

sourcing nix-your-shell causes xonsh to hang #72

Open
FlyingWombat opened this issue Mar 30, 2024 · 4 comments
Open

sourcing nix-your-shell causes xonsh to hang #72

FlyingWombat opened this issue Mar 30, 2024 · 4 comments

Comments

@FlyingWombat
Copy link

nix-shell -p xonsh
xonsh
nix-your-shell xonsh | source

xonsh will hang, with 100%cpu util.

Setting the aliases manually by copy-pasting them from nix-your-shell xonsh into the xonsh prompt works fine.

xonsh v0.15.1
nix-your-shell v1.4.4

@9999years
Copy link
Member

OK, I don't use xonsh though so I won't be able to fix this myself.

@FlyingWombat
Copy link
Author

I'm just trying out xonsh, so I don't know how it is supposed to work.

Using execx($(nix-your-shell xonsh | grep -e "aliases")) instead of nix-your-shell xonsh | source works for setting the aliases.

@Qyriad
Copy link

Qyriad commented Mar 30, 2024

This looks probably like a case of xonsh/xonsh#5317, as source is an unthreadable alias.

@bestlem
Copy link

bestlem commented May 10, 2024

@Qyriad Proably not.
I think the issue is that for xonsh source only works on files and not pipe
I think the correct code is

exec ($(nix-your-shell xonsh))

ie run a subprocess and capture its output the $() and then use Pythons"s exec to execute the code generated,.

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

No branches or pull requests

4 participants