NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.62k stars 13.77k forks source link

nix-shell with xonsh #117057

Open tex opened 3 years ago

tex commented 3 years ago

So I set xonsh as default shell with

  users.defaultUserShell = "/run/current-system/sw/bin/xonsh";

but when I do this

xonsh> nix-shell -p gcc
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
bash>

it gets me to bash. I would expect xonsh. Also it prints some weird error messages, but the package is installed and works.

Also now if I run nvim, it gets arror keys and other non-ascii characters incorrectly and tries print them instead of process them as it should.

Any idea?

dotlambda commented 3 years ago

You can use nix-shell --run xonsh.

For the rest, cc @spwhitt @vrthra

tex commented 3 years ago

@dotlambda Thanks. The run works. But the problem with nvim not working under such shell persists. nvim works all-right in normal xonsh. Any more idea? ;-)

teto commented 3 years ago

is your TERM changed in any meaningful way ? try :checkhealth

tex commented 3 years ago

Cannot check :checkhealt because whole instance of terminal crashes with some xonsh python error. Running nix-shell -p ... --run 'xonsh -DTERM=xterm-kitty' doesn't help.

teto commented 3 years ago

I tried xterm-kitty in xonsh with neovim master and it worked fine.

tex commented 3 years ago

Can you share nix override for neovim master?

And did you really run:

> xonsh
> nix-shell -p gcc --run xonsh
> nvim

?

stale[bot] commented 3 years ago

I marked this as stale due to inactivity. → More info

amacfie commented 1 year ago

https://github.com/haslersn/any-nix-shell