I think you're correct. Here's my attempt at fixing the manpage.

martijn@

On 11/13/25 12:58, Tomas Rippl wrote:
> On OpenBSD 7.8 amd, the ed(1) manual page shows:
> 
> (.,.)m(.)
> (.,.)t(.)
> 
> At the top of the COMMANDS section it says that items in parentheses denote 
> default addresses or address ranges if none is specified. This implies that 
> the destination address for m and t defaults to . and can be omitted.
> 
> However, the actual ed(1) implementation requires an explicit destination 
> address and m or t without a destination gives the error message destination 
> expected. For example:
> 
> $ ed -p'*' 
> *a 
> firstrow 
> secondrow 
> . 
> *t 
> ? 
> destination expected 
> *m 
> ? 
> destination expected 
> 
> 
> As far as I know, POSIX ed also requires a destination argument for m and t.
> 
> I believe the synopsis should be changed to something like:
> 
> (.,.)m destination
> (.,.)t destination
> 
> to avoid suggesting that the destination is optional.
> 
> Best regards,
> Tomas Rippl
> 
diff /usr/src
path + /usr/src
commit - 0377483fd63d89703211981e944e9e01c48a851d
blob - 98d4981af7fa738ac7598e2f43be670768b6b53c
file + bin/ed/ed.1
--- bin/ed/ed.1
+++ bin/ed/ed.1
@@ -461,10 +461,12 @@ The mark is not cleared until the line is deleted or o
 .It (.,.) Ns Ic l
 Prints the addressed lines unambiguously.
 The current address is set to the last line printed.
-.It (.,.) Ns Ic m Ns (.)
+.It (.,.) Ns Ic m Ns Ar address
 Moves lines in the buffer.
 The addressed lines are moved to after the
-right-hand destination address, which may be the address
+right-hand destination
+.Ar address ,
+which may be the address
 .Ad 0
 .Pq zero .
 The current address is set to the last line moved.
@@ -601,10 +603,11 @@ The
 .Ic p
 suffix toggles the print suffix of the last substitution.
 The current address is set to the last line affected.
-.It (.,.) Ns Ic t Ns (.)
+.It (.,.) Ns Ic t Ns Ar address
 Copies
 .Pq i.e., transfers
-the addressed lines to after the right-hand destination address,
+the addressed lines to after the right-hand destination
+.Ar address ,
 which may be the address
 .Ad 0
 .Pq zero .

Reply via email to