mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-03 03:50:08 +00:00
Merge pull request #7191 from gurevichmark/xcatprobe_width
Better formatting for xcatprobe output
This commit is contained in:
commit
79d2503e77
@ -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";
|
||||
|
Loading…
x
Reference in New Issue
Block a user