[asterisk-bugs] [JIRA] Created: (ASTERISK-20560) Implement curses/ncurses terminal width checking and apply it to CLI commands used all over Asterisk

Rusty Newton (JIRA) noreply at issues.asterisk.org
Fri Oct 12 15:53:28 CDT 2012


Implement curses/ncurses terminal width checking and apply it to CLI commands used all over Asterisk
----------------------------------------------------------------------------------------------------

                 Key: ASTERISK-20560
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-20560
             Project: Asterisk
          Issue Type: Improvement
          Components: Core/General
            Reporter: Jonathan Rose
            Severity: Minor


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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list