-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
Currently lines are wrapped, but it would be sweet if we fit to the terminal window and indent the wrapped lines.
The only way to get the terminal size is listed below (according to toby)
function getTermSize(cb){
require('child_process').spawn('resize').stdout.on('data', function(data){
data = String(data)
var lines = data.split('\n'),
cols = Number(lines[0].match(/^COLUMNS=([0-9]+);$/)[1]),
lines = Number(lines[1].match(/^LINES=([0-9]+);$/)[1])
if (cb)
cb(cols, lines)
})
}We could then determine how much padding is required.
FloEdelmann
Metadata
Metadata
Assignees
Labels
No labels