From 7ecea586ae2a229882b7e1c6cafb8d5d997afbcf Mon Sep 17 00:00:00 2001 From: Harald Hope Date: Wed, 17 Mar 2021 20:14:09 -0700 Subject: [PATCH] small fix for console irc tty --- inxi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inxi b/inxi index 22869a9..31ed74f 100755 --- a/inxi +++ b/inxi @@ -12044,7 +12044,10 @@ sub tty_data(){ my $tty_working = $client{'con-irc-tty'}; if ($tty_working ne '' && (my $program = main::check_program('stty'))){ my $tty_arg = ($bsd_type) ? '-f' : '-F'; - $tty_working = "tty$tty_working" if main::is_numeric($tty_working); + # handle vtnr integers, and tty ID with letters etc. + if (-e "/dev/tty$tty_working"){ + $tty_working = "tty$tty_working"; + } $tty = (main::grabber("$program $tty_arg /dev/$tty_working size 2>/dev/null"))[0]; if ($tty){ my @temp = split(/\s+/, $tty);