mirror of
https://github.com/vim/vim.git
synced 2026-04-25 04:55:57 +02:00
- Support all GNU address extensions. - Fix some bugs related to erroneous matching of pattern delimiters in bracket expressions. closes: #19587 Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
66 lines
550 B
Sed
66 lines
550 B
Sed
# sed(1)
|
|
|
|
|
|
# Addresses
|
|
|
|
|
|
# line number
|
|
|
|
42p
|
|
$p
|
|
|
|
/foobar/p
|
|
/foo[/]bar/p
|
|
/foo\/bar/p
|
|
|
|
\xxfoobarxp
|
|
\xxfoo\xbarxp
|
|
\xxfoo[x]barxp
|
|
|
|
# skip bracket expressions
|
|
\aa_\a_[a[:ascii:]a[.a.]a[=a=]a]_ap
|
|
\aa_\a_[^a[:ascii:]a[.a.]a[=a=]a]_ap
|
|
\aa_\a_[]a[:ascii:]a[.a.]a[=a=]a]_ap
|
|
\aa_\a_[^]a[:ascii:]a[.a.]a[=a=]a]_ap
|
|
|
|
|
|
# range
|
|
|
|
42,84p
|
|
/foo/,/bar/p
|
|
|
|
/foo/,42p
|
|
42,/bar/p
|
|
|
|
|
|
# GNU extensions
|
|
|
|
|
|
# step
|
|
|
|
1~2p
|
|
|
|
|
|
# ignore case, multiline
|
|
|
|
/foobar/Ip
|
|
/foobar/Mp
|
|
/foobar/IMp
|
|
/foobar/MIp
|
|
|
|
\aafoob\araIp
|
|
\aafoob\araMp
|
|
\aafoob\araIMp
|
|
\aafoob\araMIp
|
|
|
|
|
|
# increment
|
|
|
|
42,+42p
|
|
|
|
|
|
# step
|
|
|
|
42,~2p
|
|
|