I am installing dev tools on a new MacBook Air (M1) with Big Sur and the default terminal prompt is too long and includes my user name and host, so I found instructions on how to customize it.
Using the Terminal's preference window, I added this code.
export PS1="\W \$"; clear;
but when I launch the terminal, I get this prompt
\W $
I replaced W with other options, but they are never processed - I just get the literal string.
I suspect it has to do with the config file format for Terminal.