-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 develop: Ignore stdenv's $SHELL #7010
Conversation
Stdenv sets this to a bash that doesn't have readline/completion support, so running 'nix (develop|shell)' inside a 'nix develop' gives you a crippled shell. So let's just ignore the derivation's $SHELL. This could break interactive use of build phases that use $SHELL, but they appear to be fairly rare.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A small change, but such a qol improvement :)
@@ -246,6 +246,7 @@ struct Common : InstallableCommand, MixProfile | |||
"NIX_LOG_FD", | |||
"NIX_REMOTE", | |||
"PPID", | |||
"SHELL", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we instead set $SHELL
to the interactive bash we fetch from nixpkgs
? that way most stuff will just work as expected since it will still point to bash
What does this fix exactly? The only place I see As far as I can tell, |
@ncfavier It fixes this:
i.e. the inner shell doesn't have readline/completion support. |
@ncfavier It would also fix the misinterpreted prompt in VSCode terminal IIUC. |
nix develop: Ignore stdenv's $SHELL
Stdenv sets this to a bash that doesn't have readline/completion support, so running
nix shell
inside anix develop
gives you a crippled shell. So let's just ignore the derivation's$SHELL
.This could break interactive use of build phases that use
$SHELL
, butthey appear to be fairly rare.