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 1:47 PM, Frank Schwidom wrote:
> I want to create a multiline prompt. I am missing the code for carriage 
> return or newline.
>
> In bash my Prompt looks like:
>
> user@computer 2022-03-21 18:43:18:
> ~
> (ins)$
>
> This '(ins)' comes from readline in vi mode and tells me in which state I am.
>
> How can I create a newline in PS1?

Just insert an actual newline.

PS1='single-quoted stuff'$'\n''more single-quoted stuff'

-- 
vq




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