Skip to content

How do I make the RPROMPT align with the top of the PROMPT? #11994

Closed Answered by mcornella
Agent-E11 asked this question in Help
Discussion options

You must be logged in to vote

You would need to add the $RPROMPT contents to your $PROMPT on the top line, and add a spacer string (of empty spaces) so that the content is displayed on the right. As far as I know there's no other way around that:

PROMPT="%n@%m %~<a bunch of spaces>%T"$'\n> '

The spacer can be computed dynamically from the content you display and the amount of characters per row. You can check this very thorough answer: https://unix.stackexchange.com/a/250457

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Agent-E11
Comment options

Answer selected by mcornella
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants