summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdoc/mdoc2wiki.awk3
-rw-r--r--tar/bsdtar.118
2 files changed, 16 insertions, 5 deletions
diff --git a/doc/mdoc2wiki.awk b/doc/mdoc2wiki.awk
index 3f6cf22e..146d9619 100755
--- a/doc/mdoc2wiki.awk
+++ b/doc/mdoc2wiki.awk
@@ -411,8 +411,9 @@ function splitwords(l, dest, n, o, w) {
# Suppress trailer
w++
} else if(match(words[w+1],"^Pa$|^Ev$")) {
- add(".B")
+ addopen("*")
w++
+ add(words[++w] "*")
} else {
trailer = listnext[listdepth] "<dd>" trailer
listnext[listdepth] = "</dd>"
diff --git a/tar/bsdtar.1 b/tar/bsdtar.1
index ec2d61c5..c0457181 100644
--- a/tar/bsdtar.1
+++ b/tar/bsdtar.1
@@ -412,10 +412,20 @@ but before security checks.
.It Fl s Ar pattern
Modify file or archive member names according to
.Pa pattern .
-The pattern has the format /old/new/[gps].
-old is a basic regular expression.
-If it doesn't apply, the pattern is skipped.
-new is the replacement string of the matched part.
+The pattern has the format
+.Ar /old/new/ Op gps
+where
+.Ar old
+is a basic regular expression,
+.Ar new
+is the replacement string of the matched part,
+and the optional trailing letters modify
+how the replacement is handled.
+If
+.Ar old
+is not matched, the pattern is skipped.
+Within
+.Ar new ,
~ is substituted with the match, \1 to \9 with the content of
the corresponding captured group.
The optional trailing g specifies that matching should continue