Skip to content

v2.59.2 — Bash write check reads sed/perl option grammar

Latest

Choose a tag to compare

@mikeprasad mikeprasad released this 18 Nov 11:32
· 2 commits to main since this release

Fixes #3 (thanks @mattabate).

The Bash write check decided "edits a file in place" by testing whether a token was -i or started with -i, so bundled and long flags were missed: perl -pi, perl -pi.bak, perl -lpi, perl -0pi, perl -Mstrict -pi, sed -ni, sed --in-place[=SUF], sed --in, and BSD sed -I. The same test also reported the script file in sed -i -f script.sed f, and perl -pe '…' f -i, where perl has stopped reading switches and nothing is edited.

The check now reads each tool's options a character at a time; an option that takes an argument ends the cluster. A plain regex such as ^-[A-Za-z]*i would also report perl -Mstrict -e and perl -Ilib -e, where the i belongs to the module name or path, so it is not used. What the check covers is unchanged.

Ports: Claude Code 2.59.2 · Codex 2.59.2-codex.0 · Cursor 2.59.2-cursor.0 · Antigravity 2.59.2 · Cowork stays 1.8.5 (no change).