-
-
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-shell should either preserve TERMINFO and TERM or neither #1056
Comments
In case anyone is looking for a workaround, on NixOS you can add the following to your
|
I can reproduce this error on Nix 1.11.4. Using zsh, I found this to be a suitable workaround:
|
Seems reasonable to me. |
I guess we should also preserve |
Unsetting ...until I run into some software that relies on |
I marked this as stale due to inactivity. → More info |
This is a new comment |
So that's why my shells act weird sometimes. Huh. |
I marked this as stale due to inactivity. → More info |
Right now, nix-shell will inherit
$TERM
from the environment, even if--pure
is used. However, it does not preserve the value of$TERMINFO
, which leads to a situation where$TERM
is set to an invalid value in the inner shell. So either:$TERMINFO
and$TERM
$TERMINFO
or$TERM
(perhaps set$TERM = xterm
? that seems to work most of the cases)Example:
I have
$TERM
set torxvt-unicode-256color
on my system, with$TERMINFO
being/nix/store/dj4m8kaylm598bsybri8vkw3a8mv447m-rxvt-unicode-with-perl-with-unicode3-9.22-terminfo/share/terminfo
, which provides the terminfo file for that$TERM
value. If I now use nix-shell, weird effects occur like a double prompt or backspace not working correctly, because$TERM
is inherited but$TERMINFO
is not, so bash no longer finds the terminfo file for that$TERM
value.The text was updated successfully, but these errors were encountered: