On Thu, Apr 06, 2017 at 08:06:58AM +0100, Jason McIntyre wrote:
> On Thu, Apr 06, 2017 at 08:24:58AM +0200, Anton Lindqvist wrote:
> > On Wed, Apr 05, 2017 at 10:03:08PM +0100, Jason McIntyre wrote:
> > > On Wed, Apr 05, 2017 at 04:37:04PM +0200, Anton Lindqvist wrote:
> > > > Hi,
> > > > Support for decrementing a variable using the '-=' operator with
> > > > wsconsctl was added in r1.11 of wsconsctl.c. It never ended up being
> > > > documented. One might deduce that '-=' works since '+=' does.
> > > > However, I think adding documentation would be helpful.
> > > > 
> > > 
> > > if it's decided this should be documented, i suggest we change the way
> > > we're documenting this. adding a separate synopsis is silly - i see
> > > you're just following what we do now though.
> > > 
> > > i suggest removing the current += line from SYNSOPSIS and usage(), and
> > > amending the (perfectly good) description of name=value to include -=.
> > > 
> > > but first we need to know whether we want to document this or not...
> > 
> > That makes sense. Maybe this addition is sufficient enough then:
> > 
> > Index: wsconsctl.8
> > ===================================================================
> > RCS file: /cvs/src/sbin/wsconsctl/wsconsctl.8,v
> > retrieving revision 1.23
> > diff -u -p -r1.23 wsconsctl.8
> > --- wsconsctl.8     4 Aug 2008 07:32:51 -0000       1.23
> > +++ wsconsctl.8     6 Apr 2017 06:20:42 -0000
> > @@ -77,6 +77,8 @@ The value can be specified as either an 
> >  symbol,
> >  or as a relative value, by using the
> >  .Ql +=
> > +or
> > +.Ql -=
> >  symbol.
> >  See the
> >  .Sx EXAMPLES
> 
> yes, i think so. though i think "symbols" (plural) would read better.
> i'll commit this if no one shouts...
> 
> jmc
> 

...oh, not enough:

Index: wsconsctl.8
===================================================================
RCS file: /cvs/src/sbin/wsconsctl/wsconsctl.8,v
retrieving revision 1.23
diff -u -r1.23 wsconsctl.8
--- wsconsctl.8 4 Aug 2008 07:32:51 -0000       1.23
+++ wsconsctl.8 6 Apr 2017 07:46:28 -0000
@@ -45,10 +45,6 @@
 .Op Fl n
 .Op Fl f Ar file
 .Ar name Ns = Ns Ar value ...
-.Nm wsconsctl
-.Op Fl n
-.Op Fl f Ar file
-.Ar name Ns += Ns Ar value ...
 .Sh DESCRIPTION
 The
 .Nm
@@ -77,7 +73,9 @@
 symbol,
 or as a relative value, by using the
 .Ql +=
-symbol.
+or
+.Ql +=
+symbols.
 See the
 .Sx EXAMPLES
 section for more details.
Index: wsconsctl.c
===================================================================
RCS file: /cvs/src/sbin/wsconsctl/wsconsctl.c,v
retrieving revision 1.29
diff -u -r1.29 wsconsctl.c
--- wsconsctl.c 8 May 2015 19:12:51 -0000       1.29
+++ wsconsctl.c 6 Apr 2017 07:46:28 -0000
@@ -71,9 +71,8 @@
        fprintf(stderr,
            "usage: %s [-an]\n"
            "       %s [-n] [-f file] name ...\n"
-           "       %s [-n] [-f file] name=value ...\n"
-           "       %s [-n] [-f file] name+=value ...\n",
-           __progname, __progname, __progname, __progname);
+           "       %s [-n] [-f file] name=value ...\n",
+           __progname, __progname, __progname);
        exit(1);
 }
 

Reply via email to