Skip to content

Commit db979f4

Browse files
committed
Merge pull request #32 from BoiteAWeb/master
Default width of cmd window on Windows OS
2 parents b551c10 + 3d56102 commit db979f4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/cli/Shell.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ class Shell {
2424
* @todo Test on more systems.
2525
*/
2626
static public function columns() {
27-
return exec('/usr/bin/env tput cols');
27+
if( strpos( $_SERVER['OS'], 'indows' ) !== false )
28+
return exec('/usr/bin/env tput cols');
29+
else
30+
return 80; // default width of cmd window on Windows OS, maybe force using MODE CON COLS=XXX?
2831
}
2932

3033
/**

0 commit comments

Comments
 (0)