Page MenuHomeFreeBSD

sed: bring usage back into line with reality
AcceptedPublic

Authored by kevans on Sep 12 2025, 12:30 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 26, 5:51 PM
Unknown Object (File)
Sat, Oct 25, 6:50 PM
Unknown Object (File)
Thu, Oct 16, 5:02 AM
Unknown Object (File)
Thu, Oct 16, 5:02 AM
Unknown Object (File)
Oct 15 2025, 5:55 PM
Unknown Object (File)
Oct 6 2025, 1:49 PM
Unknown Object (File)
Oct 1 2025, 10:53 AM
Unknown Object (File)
Sep 29 2025, 8:41 AM

Details

Reviewers
0mp
pfg
pauamma_gundo.com
Group Reviewers
manpages
Summary

These have been wrong in one way or another since BSD 4.4 Lite at a
minimum. BSD getopt(3) does not permute non-option arguments and we do
not do any option parsing after we hit the first one, so it makes no
sense to document any option as coming after the command.

While we're here, tweak the verbiage a little bit to point out the
difference between the two synopsis forms: that the presence of -e or
-f mean we will not interpret the first non-option argument as a
command. Also, consistently use 'command' in both the manpage and the
usage.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 66982
Build 63865: arc lint + arc unit

Event Timeline

Manual page changes LGTM with that typo fixed.

usr.bin/sed/sed.1
69
This revision is now accepted and ready to land.Sep 12 2025, 3:56 PM
des added inline comments.
usr.bin/sed/main.c
201

why change “script” to the less accurate “command”?

usr.bin/sed/main.c
201

I just kind of picked one of the two ways we used to describe it. :-) I'll change them both to script.