Come ottenere il terminalizza con Perl6 / Rakudo?
Domanda
è lì per Perl6 già qualcosa per ottenere il terminalizza?
(ad esempio come il termine perl5 "termine :: readyey :: getterminalized");
Soluzione
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>;
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow