Fix bug in virtualenv deactivate script that causes PS1 to go unset
@@ -77,9 +77,12 @@ class VirtualEnvGenerator(Generator):
activate_lines = []
deactivate_lines = []
+
+ deactivate_lines.append("export %s=%s" % ("PS1", "$OLD_PS1"))
for name, activate, deactivate in self.format_values("sh", variables):
activate_lines.append("%s=%s" % (name, activate))
activate_lines.append("export %s" % name)
+ if name != "PS1":
if deactivate == '""':
deactivate_lines.append("unset %s" % name)
else:
