Don't set $PS1 in non-interactive shells

Shouldn't really matter, but you never know.
This commit is contained in:
Eelco Dolstra 2013-10-18 14:51:25 +02:00
parent 4ea034a5c5
commit 4f4a14453a

View file

@ -209,7 +209,7 @@ foreach my $expr (@exprs) {
'[ -e $stdenv/setup ] && source $stdenv/setup; ' .
($pure ? '' : 'PATH=$PATH:$p; ') .
'set +e; ' .
'PS1="\n\[\033[1;32m\][nix-shell:\w]$\[\033[0m\] "; ' .
'[ -n "$PS1" ] && PS1="\n\[\033[1;32m\][nix-shell:\w]$\[\033[0m\] "; ' .
'unset NIX_ENFORCE_PURITY; ' .
'shopt -u nullglob; ' .
$envCommand);