about summary refs log tree commit diff
path: root/src/nix-build/nix-build.cc
diff options
context:
space:
mode:
authorLinus Heckemann <git@sphalerite.org>2017-04-22T08·17+0100
committerLinus Heckemann <git@sphalerite.org>2017-05-10T11·03+0100
commitd48edcc3a5f7b20e116b3a1148af565d7f27f3cd (patch)
tree3c7835283d2e945bbdbf62e650d56801a353c0c2 /src/nix-build/nix-build.cc
parent82a9c93c7f090d5a4eebe84894669aa13d31ed61 (diff)
nix-shell: use appropriate prompt terminator
If running nix-shell as root, the terminator should be # and not $.
Diffstat (limited to 'src/nix-build/nix-build.cc')
-rwxr-xr-xsrc/nix-build/nix-build.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc
index cd4dee32674e..b7cf36d16071 100755
--- a/src/nix-build/nix-build.cc
+++ b/src/nix-build/nix-build.cc
@@ -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; "