-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Using zsh as your default shell makes nix-shell have a strange prompt #4178
Comments
I have isolated and solved the issue. It seems I had pkgs.bash installed instead of pkgs.bashInteractive. Installing bashInteractive fixed the readline problem as well as the strange prompt. Maybe bashInteractive should be installed by default (it may be and I just removed it by switching to zsh and explicitly listing pkgs.bash in system wide packages, followed by a garbage collect). |
It is not necessary to specify |
But is it necessary to specify bashInteractive? I know installing that is what fixed my issue |
It should not be, there is no mention of |
Yes, but are you running zsh as your default shell? This problem only started when I switched to zsh. |
No, I am not. Seems like something that should have been mentioned in the OP. |
I have updated it, but I figured that being in the title would have been enough. Since this is an issue, but I have found the fix (making sure bashInteractive is installed on your system) should this be reopened and moved somewhere appropriate? I think that with bash as your default shell, nixos makes sure you have bashInteractive installed (since you will definitely be using it interactively), but with zsh as your default shell, it only thinks it needs bash. So maybe it is a dependency issue for nix-shell? Or something about the way nixos handles default shells? |
I think the best way would be to open on the nix repo complaining that it requires the user to manually specify a runtime dependency. |
I have done so (NixOS/nix#355). Thank you for your help and guidance. |
This only came up after making zsh my default shell. when I run nix-shell, I get a prompt that looks like this: []$NORMALPROMPT[]. This is quite cumbersome as the up arrow and tab functionality is also missing. However, the problem can be worked around by running nix-shell --command zsh, which doesn't work with --pure, and doesn't seem to pull in the correct path.
The text was updated successfully, but these errors were encountered: