Reputation: 337
Hope someone would help. Bought new MacBook Pro 2020 yesterday and it has ZSH
by default not bash
and $ sign also disappeared. I can see there are two files in bin folder which are bash and zsh.
Is there any way I can get rid of MBP in my prompt and change my prompt name and also get back $ sign as well? please see attached pic what I am talking about.
Update
I managed to change prompt by making a new file .zshrc in home dir and adding prompt properties PROMPT='%(?.%F{green}Azam.%F{blue}?%?)%f %B%F{240}%0~%f%b %#'
. Now my prompt looking fine but its output ?127
when command not found
. Please let me know how I can fix this so it should drop back to default prompt?
Upvotes: 0
Views: 2822
Reputation: 27588
# without color
export PS1='%n %~ %(!.#.$) '
# with color
export PROMPT='%(?.%F{green}%n.%F{blue}?%?)%f %B%F{240}%~%f%b %(!.#.$) '
# remove return value (like 127) from prompt
export PROMPT='%F{green}%n%f %B%F{240}%~%f%b %(!.#.$) '
PS1
is equivalent to PROMPT
in zsh. Use whichever you want.
References
Upvotes: 3