On Fri, Oct 21, 2022 at 06:39:59PM +0100, Jason McIntyre wrote:
> i was going to incliude this in my answer, but eventually thought it
> looks like a seperate diff:
> 
> the text currently reads as though only a singular interface is
> specified, and -n is kind of hidden. so i reworked the text. i went with
> an example which basically mirrors synopsis, because it works with the
> -n text, and i wanted to avoid marking up interface, but not doing so
> added other ambiguities.
> 
> so is this better? it's as unobtrusive as i could make it.

I agree with the singular -> plural change to make clear that multiple
interfaces work.

However, I don't see much value in an example invocation at the first
place:  the synopsis is trivial, echo(1) doesn't have examples, either.

But now that I see your diff, I think we should actually include `sh'
in the synopsis since /etc/netstart is not executable, so the documented
form does not actually work (I just never noticed this missing bit):

        $ man -h netstart
        /etc/netstart [-n] [interface ...]
        $ /etc/netstart
        ksh: /etc/netstart: cannot execute - Permission denied

Feedback? Objection? OK?


Index: share/man/man8/netstart.8
===================================================================
RCS file: /cvs/src/share/man/man8/netstart.8,v
retrieving revision 1.28
diff -u -p -r1.28 netstart.8
--- share/man/man8/netstart.8   21 Oct 2022 12:04:51 -0000      1.28
+++ share/man/man8/netstart.8   21 Oct 2022 18:57:40 -0000
@@ -32,7 +32,7 @@
 .Nm netstart
 .Nd command script for network startup
 .Sh SYNOPSIS
-.Nm /etc/netstart
+.Cm sh Pa /etc/netstart
 .Op Fl n
 .Op Ar interface ...
 .Sh DESCRIPTION
Index: etc/netstart
===================================================================
RCS file: /cvs/src/etc/netstart,v
retrieving revision 1.220
diff -u -p -r1.220 netstart
--- etc/netstart        21 Oct 2022 12:04:51 -0000      1.220
+++ etc/netstart        21 Oct 2022 18:56:45 -0000
@@ -7,7 +7,7 @@ set +o sh
 
 # Show usage of the netstart script and exit.
 usage() {
-       print -u2 "usage: ${0##*/} [-n] [interface ...]"
+       print -u2 "usage: sh ${0##*/} [-n] [interface ...]"
        exit 1
 }
 

Reply via email to