Blog

Console madness

Geschrieben 2020. Versionen und Details können veraltet sein.

It looks like it's not easy to recognise the console cols and rows in every case. After a period of continuous tries and fails I found that even the 'specialists' are not able to find the size of the console in every case. Currently I use jline to find the terminal size. But if you log into karaf using an ssh client it's not possible at all.


As a reaction I created a console factory (as it should be) to create console instances for every thread and it's possible to overwrite the currently used console instance. Now in karaf it's possible to use

console set

to set a session bound console instance which will recognise the size correctly by using the session instance.