nix-shell --pure: Keep the user's $PAGER

This commit is contained in:
Eelco Dolstra 2014-04-08 14:08:57 +02:00
parent 76cbf55a6d
commit 2b6c8ef401

View file

@ -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.