mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-20 06:07:59 +00:00
Support escape sequences used by 'ls --color=auto'
This commit is contained in:
parent
afeb54ebed
commit
724a6e8120
@ -329,7 +329,20 @@ namespace Terminal {
|
|||||||
case 'H': return (_screen.cup(p1, p2), true);
|
case 'H': return (_screen.cup(p1, p2), true);
|
||||||
case 'm':
|
case 'm':
|
||||||
if ((p1 == 39) && (p2 == 49)) return (_screen.op(), true);
|
if ((p1 == 39) && (p2 == 49)) return (_screen.op(), true);
|
||||||
if ((p1 == 0) && (p2 == 10)) return (_screen.sgr(0), true);
|
if ((p1 == 0 || p1 == 1) && (p2 >= 30) && (p2 <= 37)) {
|
||||||
|
/*
|
||||||
|
* p1 encodes attribute (see 'dircolors -p')
|
||||||
|
* 0 -> normal
|
||||||
|
* 1 -> bold (turn into highlight)
|
||||||
|
*
|
||||||
|
* p2 encodes color
|
||||||
|
* 30...37 text colors
|
||||||
|
* 40...47 background colors
|
||||||
|
*/
|
||||||
|
_screen.sgr(p1);
|
||||||
|
_screen.setaf(p2 - 30);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
case 'R': return (_screen.u6(p1, p2), true);
|
case 'R': return (_screen.u6(p1, p2), true);
|
||||||
default: return false;
|
default: return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user