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?
- X-seq: zsh-users 27593
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Frank Schwidom <schwidom@xxxxxxx>
- Cc: Mikael Magnusson <mikachu@xxxxxxxxx>, Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Hi, can someone help me to convert my bash PS1 to zsh?
- Date: Mon, 21 Mar 2022 11:11:59 -0700
- Archived-at: <https://zsh.org/users/27593>
- In-reply-to: <20220321174741.GB1727@debian64>
- List-id: <zsh-users.zsh.org>
- References: <20220321160650.GA1727@debian64> <CAHYJk3S7XHDf98D3qCeC0bwmD3KqXqr52pX1xwm8Nnr=OFr1sg@mail.gmail.com> <20220321174741.GB1727@debian64>
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