Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Hi, can someone help me to convert my bash PS1 to zsh?



On Mon, Mar 21, 2022 at 10:59 AM Frank Schwidom <schwidom@xxxxxxx> wrote:
>
> How can I create a newline in PS1?

Just put an actual newline in it, zsh doesn't have a prompt "escape"
for newline.  This can be accomplished by replacing $'\\n' in your
bash PS1 assignment with $'\n' in zsh.

PS1=$'%F{green}%n@%m %D{%Y-%m-%d %H:%M:%S}:\n%F{yellow}%~\n%F{magenta}%#%f '




Messages sorted by: Reverse Date, Date, Thread, Author