Use "Fl Fl" for long options.
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
This commit is contained in:

committed by
Love Hornquist Astrand

parent
05a432aaed
commit
db8e287e41
@@ -42,58 +42,58 @@
|
||||
maintain the iprop log file
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl -version
|
||||
.Op Fl h | Fl -help
|
||||
.Op Fl Fl version
|
||||
.Op Fl h | Fl Fl help
|
||||
.Ar command
|
||||
.Pp
|
||||
.Nm iprop-log truncate
|
||||
.Oo Fl c Ar file \*(Ba Xo
|
||||
.Fl -config-file= Ns Ar file
|
||||
.Fl Fl config-file= Ns Ar file
|
||||
.Xc
|
||||
.Oc
|
||||
.Oo Fl r Ar string \*(Ba Xo
|
||||
.Fl -realm= Ns Ar string
|
||||
.Fl Fl realm= Ns Ar string
|
||||
.Xc
|
||||
.Oc
|
||||
.Op Fl h | Fl -help
|
||||
.Op Fl h | Fl Fl help
|
||||
.Pp
|
||||
.Nm iprop-log dump
|
||||
.Oo Fl c Ar file \*(Ba Xo
|
||||
.Fl -config-file= Ns Ar file
|
||||
.Fl Fl config-file= Ns Ar file
|
||||
.Xc
|
||||
.Oc
|
||||
.Oo Fl r Ar string \*(Ba Xo
|
||||
.Fl -realm= Ns Ar string
|
||||
.Fl Fl realm= Ns Ar string
|
||||
.Xc
|
||||
.Oc
|
||||
.Op Fl h | Fl -help
|
||||
.Op Fl h | Fl Fl help
|
||||
.Pp
|
||||
.Nm iprop-log replay
|
||||
.Op Fl -start-version= Ns Ar version-number
|
||||
.Op Fl -end-version= Ns Ar version-number
|
||||
.Op Fl Fl start-version= Ns Ar version-number
|
||||
.Op Fl Fl end-version= Ns Ar version-number
|
||||
.Oo Fl c Ar file \*(Ba Xo
|
||||
.Fl -config-file= Ns Ar file
|
||||
.Fl Fl config-file= Ns Ar file
|
||||
.Xc
|
||||
.Oc
|
||||
.Oo Fl r Ar string \*(Ba Xo
|
||||
.Fl -realm= Ns Ar string
|
||||
.Fl Fl realm= Ns Ar string
|
||||
.Xc
|
||||
.Oc
|
||||
.Op Fl h | Fl -help
|
||||
.Op Fl h | Fl Fl help
|
||||
.Sh DESCRIPTION
|
||||
Supported options:
|
||||
.Bl -tag -width Ds
|
||||
.It Fl -version
|
||||
.It Fl h , Fl -help
|
||||
.It Fl Fl version
|
||||
.It Fl h , Fl Fl help
|
||||
.El
|
||||
.Pp
|
||||
command can be one of the following:
|
||||
.Bl -tag -width truncate
|
||||
.It truncate
|
||||
.Bl -tag -width Ds
|
||||
.It Fl c Ar file , Fl -config-file= Ns Ar file
|
||||
.It Fl c Ar file , Fl Fl config-file= Ns Ar file
|
||||
configuration file
|
||||
.It Fl r Ar string , Fl -realm= Ns Ar string
|
||||
.It Fl r Ar string , Fl Fl realm= Ns Ar string
|
||||
realm
|
||||
.El
|
||||
.Pp
|
||||
@@ -102,11 +102,11 @@ last entry of the old log. If the log is truncted by emptying the
|
||||
file, the log will start over at the first version (0).
|
||||
.It dump
|
||||
.Bl -tag -width Ds
|
||||
.It Fl c Ar file , Fl -config-file= Ns Ar file
|
||||
.It Fl c Ar file , Fl Fl config-file= Ns Ar file
|
||||
configuration file
|
||||
.It Xo
|
||||
.Fl r Ar string ,
|
||||
.Fl -realm= Ns Ar string
|
||||
.Fl Fl realm= Ns Ar string
|
||||
.Xc
|
||||
realm
|
||||
.El
|
||||
@@ -114,15 +114,15 @@ realm
|
||||
Print out all entries in the log to standard output.
|
||||
.It replay
|
||||
.Bl -tag -width Ds
|
||||
.It Fl -start-version= Ns Ar version-number
|
||||
.It Fl Fl start-version= Ns Ar version-number
|
||||
start replay with this version
|
||||
.It Xo
|
||||
.Fl -end-version= Ns Ar version-number
|
||||
.Fl Fl end-version= Ns Ar version-number
|
||||
.Xc
|
||||
end replay with this version
|
||||
.It Fl c Ar file , Fl -config-file= Ns Ar file
|
||||
.It Fl c Ar file , Fl Fl config-file= Ns Ar file
|
||||
configuration file
|
||||
.It Fl r Ar string , Fl -realm= Ns Ar string
|
||||
.It Fl r Ar string , Fl Fl realm= Ns Ar string
|
||||
realm
|
||||
.El
|
||||
.Pp
|
||||
@@ -130,9 +130,9 @@ Replay the changes from specified entries (or all if none is
|
||||
specified) in the transaction log to the database.
|
||||
.It last-version
|
||||
.Bl -tag -width Ds
|
||||
.It Fl c Ar file , Fl -config-file= Ns Ar file
|
||||
.It Fl c Ar file , Fl Fl config-file= Ns Ar file
|
||||
configuration file
|
||||
.It Fl r Ar string , Fl -realm= Ns Ar string
|
||||
.It Fl r Ar string , Fl Fl realm= Ns Ar string
|
||||
realm
|
||||
.El
|
||||
.Pp
|
||||
|
@@ -246,20 +246,20 @@ or
|
||||
.Pp
|
||||
Long option names are prefixed with -- (double dash), and the value
|
||||
with a = (equal),
|
||||
.Fl -foo= Ns Ar bar .
|
||||
.Fl Fl foo= Ns Ar bar .
|
||||
Long option flags can either be specified as they are
|
||||
.Pf ( Fl -help ) ,
|
||||
.Pf ( Fl Fl help ) ,
|
||||
or with an (boolean parsable) option
|
||||
.Pf ( Fl -help= Ns Ar yes ,
|
||||
.Fl -help= Ns Ar true ,
|
||||
.Pf ( Fl Fl help= Ns Ar yes ,
|
||||
.Fl Fl help= Ns Ar true ,
|
||||
or similar), or they can also be negated
|
||||
.Pf ( Fl -no-help
|
||||
.Pf ( Fl Fl no-help
|
||||
is the same as
|
||||
.Fl -help= Ns no ) ,
|
||||
.Fl Fl help= Ns no ) ,
|
||||
and if you're really confused you can do it multiple times
|
||||
.Pf ( Fl -no-no-help= Ns Ar false ,
|
||||
.Pf ( Fl Fl no-no-help= Ns Ar false ,
|
||||
or even
|
||||
.Fl -no-no-help= Ns Ar maybe ) .
|
||||
.Fl Fl no-no-help= Ns Ar maybe ) .
|
||||
.Sh EXAMPLE
|
||||
.Bd -literal
|
||||
#include <stdio.h>
|
||||
|
@@ -133,7 +133,7 @@ mandoc_template(struct getargs *args,
|
||||
}
|
||||
if(args[i].long_name) {
|
||||
print_arg(buf, sizeof(buf), 1, 1, args + i, i18n);
|
||||
printf("Fl -%s%s%s",
|
||||
printf("Fl Fl %s%s%s",
|
||||
args[i].type == arg_negative_flag ? "no-" : "",
|
||||
args[i].long_name, buf);
|
||||
}
|
||||
@@ -142,7 +142,7 @@ mandoc_template(struct getargs *args,
|
||||
print_arg(buf, sizeof(buf), 1, 0, args + i, i18n);
|
||||
printf(".Oo Fl %c%s \\*(Ba Xo\n", args[i].short_name, buf);
|
||||
print_arg(buf, sizeof(buf), 1, 1, args + i, i18n);
|
||||
printf(".Fl -%s%s\n.Xc\n.Oc\n", args[i].long_name, buf);
|
||||
printf(".Fl Fl %s%s\n.Xc\n.Oc\n", args[i].long_name, buf);
|
||||
}
|
||||
/*
|
||||
if(args[i].type == arg_strings)
|
||||
@@ -165,7 +165,7 @@ mandoc_template(struct getargs *args,
|
||||
printf("\n");
|
||||
}
|
||||
if(args[i].long_name){
|
||||
printf(".Fl -%s%s",
|
||||
printf(".Fl Fl %s%s",
|
||||
args[i].type == arg_negative_flag ? "no-" : "",
|
||||
args[i].long_name);
|
||||
print_arg(buf, sizeof(buf), 1, 1, args + i, i18n);
|
||||
|
Reference in New Issue
Block a user