|Summary:||ASTERISK-20541: Implement curses/ncurses terminal width checking and apply it to CLI commands used all over Asterisk|
|Reporter:||Jonathan Rose (jrose)||Labels:|
|Date Opened:||2012-10-09 14:34:23||Date Closed:|
|Description:||Currently formatting for lists printed to the terminal is handled entirely on a case by case basis and there aren't any real standards being followed. The width of the terminal is ignored and this can make the formatting look awkward whenever a line exceeds the width of the terminal. We can use the COLS value from the curses/ncurses libraries which will generally provide a correct number of characters per line that can be printed as long as these libraries are available.|
Either term.h should provide some way of retrieving COLS at its current value, or if no n/curses library is available, provide a standard default of 80 characters. All CLI commands that generate formatted lists (usually something along the lines of 'X show Y') should be tweaked to take advantage of access COLS.