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)
Mon, Oct 6, 1:49 PM
Unknown Object (File)
Wed, Oct 1, 10:53 AM
Unknown Object (File)
Mon, Sep 29, 8:41 AM
Unknown Object (File)
Sat, Sep 27, 7:29 PM
Unknown Object (File)
Wed, Sep 24, 3:26 AM
Unknown Object (File)
Mon, Sep 15, 3:33 PM
Unknown Object (File)
Sep 12 2025, 4:43 PM
Unknown Object (File)
Sep 12 2025, 7:28 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.