Index: trunk/phase3/maintenance/mcc.php |
— | — | @@ -31,8 +31,12 @@ |
32 | 32 | $command = 'fullhelp'; |
33 | 33 | } |
34 | 34 | if ( $command === 'fullhelp' ) { |
| 35 | + $max_cmd_len = 0; |
| 36 | + foreach( array_keys( $commandList ) as $cmd ) { |
| 37 | + $max_cmd_len = max( $max_cmd_len, strlen($cmd) ); |
| 38 | + } |
35 | 39 | foreach ( $commandList as $cmd => $desc ) { |
36 | | - print "$cmd: $desc\n"; |
| 40 | + printf( "%-{$max_cmd_len}s: %s\n", $cmd, $desc ); |
37 | 41 | } |
38 | 42 | } elseif ( isset( $commandList[$command] ) ) { |
39 | 43 | print "$command: $commandList[$command]\n"; |