goodell/nowrap — Issue #2: Interleaved empty lines when run in Windows console (e.g. through Cygwin). 
Author: inkarkat
Created: 2011-11-21 10:06:46+00:00
State: open

IMO this is more an issue of incomplete Unix emulation under Windows, but maybe you can do something about it or at least include this in the script's notes:

The Windows console interprets a newline printed after the last column of the terminal as an instruction to add an empty line. So when `nowrap` cuts after column 80, an empty new line is printed. For a "Windows" terminal (e.g. TERM=cygwin), the newline would need to be omitted to avoid this. Alternatively, as a workaround, decrement the number of columns to that the terminal misbehavior isn't triggered:

cat textfile | nowrap --columns=$((COLUMNS - 1))

-- regards, ingo