My PS1 variable cannot parsed correctly, it looks like this,
\[\033[01;32m\]\u@\h\[\033[01;34m\] [\w]\[\033[00m\]
\[\033[01;32m\]\u@\h\[\033[01;34m\] [\w]\[\033[00m\]
\[\033[01;32m\]\u@\h\[\033[01;34m\] [\w]\[\033[00m\]mv .bashrc .bash_profile
\[\033[01;32m\]\u@\h\[\033[01;34m\] [\w]\[\033[00m\]source .bash_profile
\[\033[01;32m\]\u@\h\[\033[01;34m\] [\w]\[\033[00m\]
\[\033[01;32m\]\u@\h\[\033[01;34m\] [\w]\[\033[00m\]ls
Applications Desktop Documents Downloads Google Drive Library Movies Music Pictures Public
\[\033[01;32m\]\u@\h\[\033[01;34m\] [\w]\[\033[00m\]vim .bash_profile
\[\033[01;32m\]\u@\h\[\033[01;34m\] [\w]\[\033[00m\]source .bash_profile
\[\e[;31m\][\u@\h \W]$ \[\e[m\]
\[\e[;31m\][\u@\h \W]$ \[\e[m\]
\[\e[;31m\][\u@\h \W]$ \[\e[m\]
\[\e[;31m\][\u@\h \W]$ \[\e[m\]
What is happened? Thanks.
I came across this issue as well with a brand new Catalina machine. New models seem to default to zsh
shell, instead of the traditional bash
, to change this:
Go to Users & Groups
(unlock to make admin changes) right-click on your admin user, Advanced Options...
, change Login shell
to /bin/bash
This will allow you to utilize bash's prompt string parsing for a nicer prompt - as mac has traditionally supported in the past.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With