From 9711524188494ff5bcbba8c6945add89fbb29713 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 24 May 2017 11:21:38 +0200 Subject: [PATCH] Fix #1380 It lacked a backslash. Use a raw string and single quotes around PS1 to simplify this. --- src/nix-build/nix-build.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc index b7cf36d16..d5f23a37f 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\\] \"; " + R"s([ -n "$PS1" ] && PS1='\n\[\033[1;32m\][nix-shell:\w]\$\[\033[0m\] '; )s" "if [ \"$(type -t runHook)\" = function ]; then runHook shellHook; fi; " "unset NIX_ENFORCE_PURITY; " "unset NIX_INDENT_MAKE; "