zsh right-justify in ps1

Posted by Nate on Super User See other posts from Super User or by Nate
Published on 2011-11-14T00:53:43Z Indexed on 2011/11/14 1:55 UTC
Read the original article Hit count: 442

Filed under:
|

I'd like a multi-line zsh prompt with a right alined part, that will look something like this:

2.nate@host:/current/dir                                               16:00
->

I know about RPROMPT in zsh, but that has a right-aligned prompt opposite your normal prompt, which is on the same line of text as your typing.

Is there a way to have a right-aligned portion to the first line of a multi-line command prompt? I'm looking for either a directive in the PS1 variable that says 'right align now' or a variable that is to PS1 what RPROMPT is to PROMPT.

Thanks!

© Super User or respective owner

Related posts about zsh

Related posts about prompt