mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 11:22:27 +00:00 
			
		
		
		
	Merge pull request #7191 from gurevichmark/xcatprobe_width
Better formatting for xcatprobe output
This commit is contained in:
		| @@ -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"; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user