Hacker News new | ask | show | jobs
by Noumenon72 1924 days ago
Might be useful but I just spent half an hour trying everything at https://stackoverflow.com/questions/16715103/bash-prompt-wit... on a MacBook Pro and none of it worked.
2 comments

That's because, as a MacOS user, you are probably using the Z shell, not the Bourne Again shell. Prompt syntax is specific to each individual shell program.

One cannot just blindly use a Stack Exchange Q&A that states that it is for "Linux" and "bash" on the Z shell on MacOS, or indeed on the Z shell on a Linux-based operating system for that matter. Or in the C shell. Or in the Korn shell. Or in the Watanabe shell.

Maybe you are not using bash. echo $SHELL to find out.