anki-code / xontrib-prompt-starship

Starship cross-shell prompt in xonsh shell.
MIT License
51 stars 8 forks source link

multi-line prompt not taking up full terminal #8

Closed cycomanic closed 1 year ago

cycomanic commented 1 year ago

I'm using a multi-line prompt in starship which works correctly in fish, however only takes up a fraction of the terminal size in xonsh.

Starship example setup

format = """
AA$fill\
$time\
$line_break\
$character
"""

[fill]
symbol = "."

[time]
disabled = false
style = "bold bright-black"
format = "[$time]($style)"

in fish this looks like this:

+-----------------------------------------------------------------------------------------------------------------------------------------------+ |AA........................................................................................................................................................11:45:31| |❯

if I use the same in xonsh with xontrib-prompt-starship:

+-----------------------------------------------------------------------------------------------------------------------------------------------+ |AA......................................................................11:45:36 | |❯

Note the prompt only fills up half the terminal window. I get similar behavior if I create a right prompt, which is also not aligned to the right of the terminal. If I use xontrib-prompt-bar I get the same issue, however if I specify #noesc it fixes the issue (however I loose the color in my prompt).

anki-code commented 1 year ago

PR is welcome!

cycomanic commented 1 year ago

Fixed it, but forgot to create the pull request. Done now.