brujoand / sbp

Simple Bash Prompt (SBP) is a bash prompt, which strives to be simple. But it isn't. But it looks kind of nice. I think.
MIT License
331 stars 26 forks source link

Prompt rendering in JuiceSSH on android #127

Closed geolaw closed 2 years ago

geolaw commented 2 years ago

I connect to my home linux machines using juicessh from my android phone.

When the prompt renders, its almost as if there is a trailing control character with shifts the cursor back one character to the left. this is a real pain because its very hard to tell if there is a space in the current command

juicessh

​I try flipping the layout from lines to powerline, etc, load_threshold is set to 58 .. but as the image shows, when the prompt renders, it like the left arrow is being generated and drops the cursor over the last typed character. e.g. when typing the command 'pwd' and it appears I've arrowed back one character between the 'pw' and the 'd'

with my phone in portrait mode, 'tput cols' shows 57, and landscape is 119. So i portrait mode, I get 'lines', but landscape is 'powerline' - both render the prompt the same way as described above.

TERM is xterm-256color

glaw@hive][~] [last: 0m 0s][08:41:18]└➜ echo $PS1 \n┍[\e[39m][\e[49m][\e[38;2;80;73;69m][glaw@hive][\e[39m][\e[49m][\e[38;2;0;135;175m][~][\e[39m][\e[49m][\e[39m] [\e[39m][\e[49m][\e[38;2;189;174;147m][last: 0m 0s][\e[39m][\e[49m][\e[38;2;80;73;69m][08:41:18]\n[\e[39m][\e[49m]└[\e[39m][\e[49m][\e[39m]➜

geolaw commented 2 years ago

seems to have been something in powerline. if I force the COLUMNS to fall back to 'lines' for anything less than 80, it renders the prompt correctly within juicessh this is between the working/not working configs

$ diff optimus/sbp/settings.conf dell/sbp/settings.conf 15c15 < if [[ "$COLUMNS" -le 80 ]]; then

if [[ "$COLUMNS" -le 54 ]]; then