nix-shell --pure: Keep the user's $PAGER
This commit is contained in:
parent
76cbf55a6d
commit
2b6c8ef401
|
@ -208,7 +208,7 @@ foreach my $expr (@exprs) {
|
|||
# Set the environment.
|
||||
if ($pure) {
|
||||
foreach my $name (keys %ENV) {
|
||||
next if grep { $_ eq $name } ("HOME", "USER", "LOGNAME", "DISPLAY", "PATH", "TERM", "IN_NIX_SHELL", "TZ");
|
||||
next if grep { $_ eq $name } ("HOME", "USER", "LOGNAME", "DISPLAY", "PATH", "TERM", "IN_NIX_SHELL", "TZ", "PAGER");
|
||||
delete $ENV{$name};
|
||||
}
|
||||
# NixOS hack: prevent /etc/bashrc from sourcing /etc/profile.
|
||||
|
|
Loading…
Reference in a new issue