You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Escape codes that change color don't work properly #507
Mosh takes the somewhat-opinionated view that the 256color escape sequences need to be generated exactly as specified in the terminfo entry -- which means it's ok to combine arbitrary rendition (color) changes in general, but not the 256color sequences as you're using here. (The 256color sequences are somewhat ill-specified in the first place so we try to keep to a restrictive interpretation to be safe.) This is not the first time this issue has come up, but in general we haven't heard a lot of complaints.
What program is generating the sequence you gave above? If this is common, we might want to change our stance. (Our understanding is that a terminfo or ncurses program will never generate a sequence like that, but if we're wrong, please let us know!)
I understand that powerline could be easily patched, but the same issue could arise in other scenarios, so in my opinion the fix in mosh would be more appropriate.
Sorry, @keithw, but I think this is the right thing to do. Terminfo/termcap were never intended as complete descriptions of terminal behavior; they're just databases that curses/terminfo can refer to to figure out what they should do. All of the other emulator code I've looked at (I think there were at least 3: xterm, gnome-terminal, rxvt maybe?) works this way.
Activity
keithw commentedon Mar 25, 2014
Mosh takes the somewhat-opinionated view that the 256color escape sequences need to be generated exactly as specified in the terminfo entry -- which means it's ok to combine arbitrary rendition (color) changes in general, but not the 256color sequences as you're using here. (The 256color sequences are somewhat ill-specified in the first place so we try to keep to a restrictive interpretation to be safe.) This is not the first time this issue has come up, but in general we haven't heard a lot of complaints.
What program is generating the sequence you gave above? If this is common, we might want to change our stance. (Our understanding is that a terminfo or ncurses program will never generate a sequence like that, but if we're wrong, please let us know!)
pankdm commentedon Mar 25, 2014
Thank you for the reply.
I am using powerline (https://github.com/Lokaltog/powerline). It generates the escape sequence in format I mentioned before (see https://github.com/Lokaltog/powerline/blob/develop/powerline/renderers/shell.py#L62).
I understand that powerline could be easily patched, but the same issue could arise in other scenarios, so in my opinion the fix in mosh would be more appropriate.
junzh0u commentedon Apr 7, 2014
Encounter the same problem, with Powerline + Mosh. I would really appreciate it if you are gonna fix this from mosh side.
undassa commentedon May 11, 2014
same problem
elventear commentedon Jul 24, 2014
Also affected by this.
issue mobile-shell#507: fix/simplify parsing of colors
issue mobile-shell#507: fix/simplify parsing of colors
issue #507: fix/simplify parsing of colors
cgull commentedon Jun 6, 2015
Fix merged.
cgull commentedon Jun 6, 2015
Sorry, @keithw, but I think this is the right thing to do. Terminfo/termcap were never intended as complete descriptions of terminal behavior; they're just databases that curses/terminfo can refer to to figure out what they should do. All of the other emulator code I've looked at (I think there were at least 3: xterm, gnome-terminal, rxvt maybe?) works this way.
keithw commentedon Feb 11, 2016
The issue is closed because we believe it is solved. If you use mosh and find a problem, please open a new issue.