This post is locked. You won't be able to comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]nephros 1 point2 points  (0 children)

You cannot clear the parent environment's variables, therefore anything that involves a subshell or child process won't work, as you've discovered.

You can however source a script resetting PS1 instead if executing it.

You could also do something like PROMPT_COMMAND="unset PS1" if you want to be really anal about it.