- Version: from
v6.6.0
- Platform: mostly Windows
- Subsystem: readline
Recently, I've got a complaint that some of my old scripts for a line by line processing of big files add unexpected new lines. The cause seems to be similar to the one described in this OP.
I suggest two variants of precaution:
-
Add a small note to the doc + set crlfDelay to Infinity in our main file stream example. This change is milder, but it is also a bit confusing and makes the fs example look like a workaround or even an abuse of terminal API.
-
Automatically set crlfDelay to Infinity when terminal is false or even completely remove this check from ._normalWrite(). Is there any reason for this option in fs use cases?
Refs: #8109, #13497
v6.6.0Recently, I've got a complaint that some of my old scripts for a line by line processing of big files add unexpected new lines. The cause seems to be similar to the one described in this OP.
I suggest two variants of precaution:
Add a small note to the doc + set
crlfDelaytoInfinityin our main file stream example. This change is milder, but it is also a bit confusing and makes thefsexample look like a workaround or even an abuse of terminal API.Automatically set
crlfDelaytoInfinitywhenterminalisfalseor even completely remove this check from._normalWrite(). Is there any reason for this option infsuse cases?Refs: #8109, #13497