% prompt in terminal instead of $

i was learning some terminal commands. on my own. unsupervised. bad idea. i get it. at some point i typed "mail" (because i got a notification in terminal that i had some 900+ messages.) ever since then, my command line ends with a "%" instead of the usual "$" that i'm used to seeing.


what did i do, and how do i fix it?

MacBook, macOS 10.15

Posted on Mar 4, 2020 1:51 PM

Reply
Question marked as Top-ranking reply

Posted on Mar 4, 2020 2:19 PM

Bash or Zsh shell? The PS1 prompt syntax is different. The '%' character is the standard prompt character in the zsh shell.


Bash (~/.bash_profile):


export PS1="\h: \w \$ "


Zsh (in ~/.zshrc or ~/.zshprofile):


prompt='"%m: %~ $ '
or
export PS1="%m: %~ $ "



4 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

% prompt in terminal instead of $

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.