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 27594
- From: Frank Schwidom <schwidom@xxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Frank Schwidom <schwidom@xxxxxxx>, 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 19:17:59 +0100
- Archived-at: <https://zsh.org/users/27594>
- In-reply-to: <CAH+w=7bSeHzUNnaKkb8xS21kMsTnjdfz=K4twJPJ8zpjfQZi2g@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <20220321160650.GA1727@debian64> <CAHYJk3S7XHDf98D3qCeC0bwmD3KqXqr52pX1xwm8Nnr=OFr1sg@mail.gmail.com> <20220321174741.GB1727@debian64> <CAH+w=7bSeHzUNnaKkb8xS21kMsTnjdfz=K4twJPJ8zpjfQZi2g@mail.gmail.com>
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