This is a very simple python script that removes the PWD and username from a command output.
I wrote it to copy and paste Python errors to ChatGPT without giving it all of my personal data.
Put this into ~/bin/censor and have ~/bin on PATH:
#!/usr/bin/env python3