nix-shell: use appropriate prompt terminator

If running nix-shell as root, the terminator should be # and not $.
This commit is contained in:
Linus Heckemann 2017-04-22 09:17:08 +01:00
parent 82a9c93c7f
commit d48edcc3a5

View file

@ -438,7 +438,7 @@ int main(int argc, char ** argv)
"[ -e $stdenv/setup ] && source $stdenv/setup; "
"%3%"
"set +e; "
"[ -n \"$PS1\" ] && PS1=\"\\n\\[\\033[1;32m\\][nix-shell:\\w]$\\[\\033[0m\\] \"; "
"[ -n \"$PS1\" ] && PS1=\"\\n\\[\\033[1;32m\\][nix-shell:\\w]\\$\\[\\033[0m\\] \"; "
"if [ \"$(type -t runHook)\" = function ]; then runHook shellHook; fi; "
"unset NIX_ENFORCE_PURITY; "
"unset NIX_INDENT_MAKE; "