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 2022-03-21 11:11:59, Bart Schaefer wrote:
> 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 '
>

Thanks.





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