Powerlevel9k / powerlevel9k

Powerlevel9k was a tool for building a beautiful and highly functional CLI, customized for you. P9k had a substantial impact on CLI UX, and its legacy is now continued by P10k.
https://github.com/romkatv/powerlevel10k
MIT License
13.46k stars 949 forks source link

using a newline in the left prompt causes the right prompt to start on the second line #1363

Open Martmists-GH opened 4 years ago

Martmists-GH commented 4 years ago

Describe Your Issue

The right prompt is on the second line due to the newline segment in the left prompt image

Have you tried to debug or fix it?

I have tried to make a manual newline prompt and use terminal tweaks, but couldn't find a solution.

Environment Information

MaxL commented 4 years ago

you can use POWERLEVEL9K_RPROMPT_ON_NEWLINE=false for that

romkatv commented 4 years ago

POWERLEVEL9K_RPROMPT_ON_NEWLINE=false is the default, so it won't do anything if you set it explicitly.

The problem is that POWERLEVEL9K_RPROMPT_ON_NEWLINE is ignored unless POWERLEVEL9K_PROMPT_ON_NEWLINE is set to true. However, the latter means that you cannot put any prompt segments on the last line. There is no fundamental reason for these restrictions. They just came about.

Martmists-GH commented 4 years ago

So are there any plans to fix this bug?

romkatv commented 4 years ago

I'm not a powerlevel9k dev (nor a user), so I wouldn't know what the plans are. There is not much activity right now, so I wouldn't bet on this issue being resolved soon.

P.S.

I think calling it a limitation rather than a bug is more appropriate. It doesn't help you, of course, but it's more charitable to the devs.

Martmists-GH commented 4 years ago

Seems like this is a known bug and #843 will fix this, if merged.

romkatv commented 4 years ago

Seems like this is a known bug and #843 will fix this, if merged.

Yep. It cannot be merged into master though, for it'll break the majority of p9k configurations, including the default. It could be merged into next, where it's sorta OK to introduce non-backward-compatible changes.

Once again, I'm not a powerlevel9k dev, so my opinion doesn't carry any weight here.