Skip to contentSkip to conversation

agetty improvement

PATCH Victor Ananjevsky 2 participants 2 messages Jan 27, 2016 – Feb 11, 2016 Util-Linux package

lore
Share & tools
lore
#0 lore raw

hi list

is that possible to add a handle of esc sequences (\eXXX) to agetty in an upcomeng releases? there is a simple patch to do this

term-utils/agetty.c renamed from term-utils/agetty.c.orig +3 -0
@@ -2104,6 +2104,9 @@
 		}
 		break;
 	}
+	case 'e':
+		printf("\033");
+		break;
 	case 'u':
 	case 'U':
 	{
Signature · 1 line
Victor Ananjevsky <[email protected]>
maintainer
#1 lore raw

term-utils/agetty.c line 2109

Quoted 13 lines · Victor Ananjevsky

is that possible to add a handle of esc sequences (\eXXX) to agetty in an upcomeng releases? there is a simple patch to do this

term-utils/agetty.c renamed from term-utils/agetty.c.orig +3 -0
@@ -2104,6 +2104,9 @@
 		}
 		break;
 	}
+	case 'e':
+		printf("\033");
+		break;

You can already use ESC sequences in the issue file, but I agree that use \e is more readable and elegant.

Implemented, will be in v2.28. Thanks!

Now when I think about it, we already have infrastructure to convert color names to the real sequences. Maybe it would be nice to support \e{red} \e{lightgreen} to keep /etc/issue files more readable. Comments?

Karel

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com