<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/usr.bin/sed, branch upstream/13.1.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=upstream%2F13.1.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=upstream%2F13.1.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2021-04-15T12:43:10Z</updated>
<entry>
<title>sed(1): Add a reference for a 4.4BSD manual document</title>
<updated>2021-04-15T12:43:10Z</updated>
<author>
<name>Gordon Bergling</name>
<email>gbe@FreeBSD.org</email>
</author>
<published>2021-04-08T18:57:14Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1d51d41519f3fce786c2fe64e55cf95c39475c70'/>
<id>urn:sha1:1d51d41519f3fce786c2fe64e55cf95c39475c70</id>
<content type='text'>
Obtained from:	OpenBSD

(cherry picked from commit 9048d9a933f57991ee042618ab89dd49d8cbad89)
</content>
</entry>
<entry>
<title>sed: fix hex_subst test after after r363679</title>
<updated>2020-07-30T13:36:24Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2020-07-30T13:36:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=98369a6980f5448fa9ab8bde9f04ba10c4ca3c93'/>
<id>urn:sha1:98369a6980f5448fa9ab8bde9f04ba10c4ca3c93</id>
<content type='text'>
r363679 is in-fact the future change referenced by the comment, helpfully
left and forgotten by kevans. Instead of just silently not matching, we
should now be erroring out with vigor.
</content>
</entry>
<entry>
<title>sed: treat '[' as ordinary character in 'y' command</title>
<updated>2020-07-26T09:15:05Z</updated>
<author>
<name>Yuri Pankov</name>
<email>yuripv@FreeBSD.org</email>
</author>
<published>2020-07-26T09:15:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=14fdf163717efe7730104832b7a4b09c963c42ea'/>
<id>urn:sha1:14fdf163717efe7730104832b7a4b09c963c42ea</id>
<content type='text'>
'y' does not handle bracket expressions, treat '[' as ordinary character
and do not apply bracket expression checks (GNU sed agrees).

PR:		247931
Reviewed by:	pfg, kevans
Tested by:	antoine (exp-run), Quentin L'Hours &lt;lhoursquentin@gmail.com&gt;
Differential Revision:	https://reviews.freebsd.org/D25640
</content>
</entry>
<entry>
<title>sed/multi_test: print comment for current test, not next one</title>
<updated>2020-07-13T01:32:37Z</updated>
<author>
<name>Yuri Pankov</name>
<email>yuripv@FreeBSD.org</email>
</author>
<published>2020-07-13T01:32:37Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e4bfd2a67584983ad0246abd84982b2e6539204c'/>
<id>urn:sha1:e4bfd2a67584983ad0246abd84982b2e6539204c</id>
<content type='text'>
This is visible when e.g. 8.20 is failing:

not ok 96 8.20 # \ in y command

8.20's comment should be '[ as an s delimiter and its escapes'.
</content>
</entry>
<entry>
<title>Remove some more duplicate test cases I accidentally committed</title>
<updated>2020-06-11T18:14:34Z</updated>
<author>
<name>Mateusz Piotrowski</name>
<email>0mp@FreeBSD.org</email>
</author>
<published>2020-06-11T18:14:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=c6f7593c1db0a3f06e3f20a79c1fd888660d9acb'/>
<id>urn:sha1:c6f7593c1db0a3f06e3f20a79c1fd888660d9acb</id>
<content type='text'>
Reported by:	markj, yuripv
MFC after:	2 weeks
X-MFC-With:	362017
</content>
</entry>
<entry>
<title>Remove duplicate lines from sed tests</title>
<updated>2020-06-11T03:03:52Z</updated>
<author>
<name>Mateusz Piotrowski</name>
<email>0mp@FreeBSD.org</email>
</author>
<published>2020-06-11T03:03:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=df471ef449744e3c0de468b74fc650cc44655894'/>
<id>urn:sha1:df471ef449744e3c0de468b74fc650cc44655894</id>
<content type='text'>
Reported by:	yuripv
Approved by:	pfg (src)
MFC after:	2 weeks
X-MFC-With:	362017
</content>
</entry>
<entry>
<title>Read commands from stdin when -f - is passed to sed(1)</title>
<updated>2020-06-10T19:23:58Z</updated>
<author>
<name>Mateusz Piotrowski</name>
<email>0mp@FreeBSD.org</email>
</author>
<published>2020-06-10T19:23:58Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=f9ab72bb471a141f31a4476bb11bdaef81daf479'/>
<id>urn:sha1:f9ab72bb471a141f31a4476bb11bdaef81daf479</id>
<content type='text'>
This patch teaches sed to interpret a "-" in a special way when given
as an argument to the -f flag.

This behavior is also present in GNU sed.

PR:		244872
Tested by:	antoine (exp-run)
Reviewed by:	pfg, tobik (older version)
Approved by:	pfg (src)
Relnotes:	yes
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D24079
</content>
</entry>
<entry>
<title>sed: attempt to learn about hex escapes (e.g. \x27)</title>
<updated>2020-06-07T04:32:38Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2020-06-07T04:32:38Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3a4d70c5888893475d36a664265b2298cd9d0700'/>
<id>urn:sha1:3a4d70c5888893475d36a664265b2298cd9d0700</id>
<content type='text'>
Somewhat predictably, software often wants to use \x27/\x24 among others so
that they can decline worrying about ugly escaping, if said escaping is even
possible. Right now, this software is using these and getting the wrong
results, as we'll interpret those as x27 and x24 respectively. Some examples
of this, when an exp-run was ran, were science/octopus and misc/vifm.

Go ahead and process these at all times.  We allow either one or two digits,
and the tests account for both.  If extra digits are specified, e.g. \x2727,
then the third and fourth digits are interpreted literally as one might
expect.

PR:		229925
MFC after:	2 weeks
</content>
</entry>
<entry>
<title>Update SYNOPSIS section to be consistent regarding -u, -i, and -I.</title>
<updated>2020-05-19T09:17:20Z</updated>
<author>
<name>Benedict Reuschling</name>
<email>bcr@FreeBSD.org</email>
</author>
<published>2020-05-19T09:17:20Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8655a965fd832ca6b598af7bf15875036520484c'/>
<id>urn:sha1:8655a965fd832ca6b598af7bf15875036520484c</id>
<content type='text'>
Apparently, when the -u, -i and -I options where added to sed(1), it was
forgotten to add them to both lines in the SYNOPSIS section. They were only
added to the second line, although they apply to both.

With the updated SYNOPSIS, it is now allowed (and consistent) to run:

sed -i BAK s/foo/bar/g some_file

PR:		240556
Submitted by:	Oliver Fromme
MFC after:	5 days
</content>
</entry>
<entry>
<title>sed: process \r, \n, and \t</title>
<updated>2019-12-10T19:16:00Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2019-12-10T19:16:00Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6e816d8711558c9a7daf7959448b0c99d1fd07d1'/>
<id>urn:sha1:6e816d8711558c9a7daf7959448b0c99d1fd07d1</id>
<content type='text'>
This is both reasonable and a common GNUism that a lot of ported software
expects.

Universally process \r, \n, and \t into carriage return, newline, and tab
respectively. Newline still doesn't function in contexts where it can't
(e.g. BRE), but we process it anyways rather than passing
UB \n (escaped ordinary) through to the underlying regex engine.

Adding a --posix flag to disable these was considered, but sed.1 already
declares this version of sed a super-set of POSIX specification and this
behavior is the most likely expected when one attempts to use one of these
escape sequences in pattern space.

This differs from pre-r197362 behavior in that we now honor the three
arguably most common escape sequences used with sed(1) and we do so outside
of character classes, too.

Other escape sequences, like \s and \S, will come later when GNU extensions
are added to libregex; sed will likely link against libregex by default,
since the GNU extensions tend to be fairly un-intrusive.

PR:		229925
Reviewed by:	bapt, emaste, pfg
Differential Revision:	https://reviews.freebsd.org/D22750
</content>
</entry>
</feed>
