2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-19 04:40:21 +00:00

Better formatting fox xcatprobe output

This commit is contained in:
Mark Gurevich
2022-06-06 10:06:44 -04:00
parent f858382f5e
commit 47ec9264a1

View File

@ -100,7 +100,10 @@ sub format_cmd_output {
$msg =~ s/\t/ /g;
my $flaglen = 6;
my $desiredwidth = 120;
my $screenwidth = (`tput cols` + 0);
my $screenwidth = 80;
if ($ENV{'TERM'}) {
$screenwidth = (`tput cols` + 0);
}
my $maxlen = ($screenwidth > $desiredwidth ? $desiredwidth : $screenwidth);
my @finalmsg = ();
@ -194,7 +197,10 @@ sub listvalidsubcmd {
$maxlen += 4;
my $desiredwidth = 120;
my $screenwidth = (`tput cols` + 0);
my $screenwidth = 80;
if ($ENV{'TERM'}) {
$screenwidth = (`tput cols` + 0);
}
my $finallen = ($screenwidth > $desiredwidth ? $desiredwidth : $screenwidth);
print "Supported sub commands are:\n";