-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
nix-shell breaks if bash is in scope #29960
Comments
@cleverca22 points out on |
I observe same "picture" when run
EDIT: oh nice, the trick from @cleverca22 fixes my issue too! |
This is a Nix issue. |
And I can't reproduce it with
|
Yeah, looks like NixOS/nix@c94f3d5 fixed it |
Actually, this is quite a duplicate And pending fix for 1.11.x |
The PR pointed to above NixOS/nix#1483 says that it's a backport... On Darwin, I still get a broken shell if I run a pure shell (arrow buttons do not work): Passing
|
Thank you for your contributions. This has been automatically marked as stale because it has had no activity for 180 days. If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity. Here are suggestions that might help resolve this more quickly:
|
Apparently, `nix develop` is setting `SHELL` with a non-interactive Bash, which causes issues such as those described here: - NixOS/nixpkgs#29960 - NixOS/nix#2034 This commit also fallbacks to using the `bashInteractive` shell if the user executes `nix develop` without the impure flag (which makes `builtins.getEnv` return an empty string). `bashInteractive` was also added as a package since, by default, `nix develop` ships with a non-interactive bash, which would cause issues if the user, for some reason, happens to invoke `bash` manually.
Issue description
Terminal handling within
nix-shell
appears to break if thebash
derivation is in scope.Steps to reproduce
First verify that
nix-shell
works ifbash
isn't in scope,Try pressing up arrow to go back in shell history, note that it works as expected. Send mouse event to TTY (e.g. click in a mouse-capable terminal emulator), note that nothing happens.
Now try bringing
bash
into scope,Note how prompt is mangled, pressing up arrow key results in
^[[A
being echoed to terminal instead of moving within shell history. Things are generally broken.Technical details
18.03pre116572.9824ca6975 (Impala)
, also confirmed on17.03
.nix-env (Nix) 1.11.15
"18.03pre116572.9824ca6975"
build-use-sandbox = false
nix-shell
version:nix-shell (Nix) 1.11.15
The text was updated successfully, but these errors were encountered: