07a490
diff --git a/variables.c b/variables.c
07a490
index b7ebaea..5e2986f 100644
07a490
--- a/variables.c
07a490
+++ b/variables.c
07a490
@@ -467,7 +467,11 @@ initialize_shell_variables (env, privmode)
07a490
 #endif
07a490
       set_if_not ("PS2", secondary_prompt);
07a490
     }
07a490
-  set_if_not ("PS4", "+ ");
07a490
+
07a490
+  if (current_user.euid == 0)
07a490
+    bind_variable ("PS4", "+ ", 0);
07a490
+  else
07a490
+    set_if_not ("PS4", "+ ");
07a490
 
07a490
   /* Don't allow IFS to be imported from the environment. */
07a490
   temp_var = bind_variable ("IFS", " \t\n", 0);
07a490
-- 
07a490
2.9.3
07a490