diff --git a/utils/column.cpp b/utils/column.cpp index 5f9ba72d..5db25a73 100644 --- a/utils/column.cpp +++ b/utils/column.cpp @@ -28,6 +28,7 @@ #include #include #include +#include int termwidth = 80; @@ -111,6 +112,10 @@ void version(const char* argv0) int main(int argc, char* argv[]) { + struct winsize ws; + if ( tcgetwinsize(1, &ws) == 0 ) + termwidth = ws.ws_col; + const char* argv0 = argv[0]; for ( int i = 1; i < argc; i++ )