Skip to content

No warning when only a Windows line break is piped in - #731

Merged
mathiasrw merged 1 commit into
mainfrom
fix/727
Oct 14, 2026
Merged

mathiasrw merged 1 commit into
mainfrom
fix/727

Conversation

@mathiasrw

Copy link
Copy Markdown
Owner

Today

RexReplace warns when data is piped in together with files and no flag tells what to do with it (#719).

Empty piped data and a single \n give no warning. A single \r\n does:

> printf '\r\n' | rexreplace foo bar my.file
 🟡 Data is piped in, but no flag tells what to do with it. It is not used.

my.file

On Windows a line break is \r\n, so an empty echo piped in gives the warning there.

Change

A single \r\n is treated the same as a single \n: no warning.

Good to know

Reference

🤖 Generated with Claude Code

The warning for piped data that is not used (#719) was skipped for empty
data and for a single `\n`, but not for a single `\r\n`.

This is the last part of #727 that was not already in main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mathiasrw
mathiasrw merged commit 3f962c5 into main Oct 14, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant