Pregunta

¿Ya es para Perl6 algo para obtener el terminal de terminales?

(por ejemplo, como el término PERL5 ":: Listo :: GetTerminalsize");

¿Fue útil?

Solución

I'm not aware of a direct method, but parsing qx/resize/ should work on systems where the resize command is available.

Update: somewhat golfed parsing code:

my %h = qx/resize/.lines.grep(/\=/).map: { m/(\w+) \= (\d+) /; $/.list };
my ($y, $x) =  %h<LINES COLUMNS>;
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top