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.
When generating a right-side prompt segment that has an icon but no other content (like status in the OK state), whitespace is inserted both before and after this empty content, resulting in an extended prompt segment. When there is content, it looks fine, because there should be whitespace on both sides of the text:
(Showing status segment on both left and right for comparison.)
This fix modifies the logic in default.p9k for right-side prompt generation so that a second whitespace character is not inserted in the event of an empty ${content} string. However, it leaves the previous bracketing whitespace intact if content exists:
When generating a right-side prompt segment that has an icon but no other content (like
status
in theOK
state), whitespace is inserted both before and after this empty content, resulting in an extended prompt segment. When there is content, it looks fine, because there should be whitespace on both sides of the text:(Showing
status
segment on both left and right for comparison.)This fix modifies the logic in
default.p9k
for right-side prompt generation so that a second whitespace character is not inserted in the event of an empty${content}
string. However, it leaves the previous bracketing whitespace intact if content exists: