I have a perl script that is writing to stdout which is a tty. Is there a way to determine how many spaces to a tab on that tty?
Asked
Active
Viewed 355 times
1 Answers
8
You want the 'it' capability from terminfo.
use Term::Terminfo;
my $ti = Term::Terminfo->new;
$tabsize = $ti->getnum( "it" );

Leolo
- 1,327
- 9
- 14
-
-
@sid_com - init_tabs. Google's your friend. One of the first 3 links on googling "terminfo it tab" yields: "it# - Initial number of spaces between tabs."; http://www.comptechdoc.org/os/linux/howlinuxworks/linux_hltermcommands.html – DVK Nov 12 '10 at 17:16