Remember when prompt engineering was about making PS1 nice.

On that topic, who has a sick PS1 I can steal?

@tykling

This is what I use. It's not super fancy, but it shows the information I need pretty compactly.

export PS1='$(test $? -eq 0 || echo ❌)\[\e[1;32m\]\u\[\e[00m\]@\[\e[0;32m\]\h\[\e[1;34m\]\w\[\e[00m\]\$ '

This trick means my prompts are always placed to the left even when a command ends without a newline:

PROMPT_COMMAND='printf "%%%$((COLUMNS-1))s\\r"'