1
0
forked from bonsai/harakit

docs: fixed formatting of many manpages

This commit is contained in:
2024-03-26 18:26:51 -06:00
parent 127192185f
commit a6fd1108c6
6 changed files with 218 additions and 135 deletions

View File

@@ -1,5 +1,5 @@
.\" Copyright (c) 20232024 DTB <trinity@trinity.moe>
.\" Copyright (c) 2023 Emma Tebibyte <emma@tebibyte.media>
.\" Copyright (c) 20232024 Emma Tebibyte <emma@tebibyte.media>
.\"
.\" This work is licensed under CC BY-SA 4.0. To see a copy of this license,
.\" visit <http://creativecommons.org/licenses/by-sa/4.0/>.
@@ -13,7 +13,7 @@ intcmp \(en compare integers
.SH SYNOPSIS
intcmp
.RB ( -eghl )
.RB ( -egl )
.RB [ integer ]
.RB [ integer... ]
@@ -23,35 +23,52 @@ Intcmp compares integers.
.SH USAGE
The -e option permits given integers to be equal to each other. If combined
with -g or -l, only adjacent integers in the argument sequence can be equal.
.PP
The -g option permits a given integer to be greater than the following integer.
.PP
The -l option permits a given integer to be less than the following integer.
.PP
.B -e
.RS
Permits given integers to be equal to each other. If combined with
.B -g
or
.B -l
, only adjacent integers in the argument sequence can be equal.
.RE
.B -g
.RS
Permits a given integer to be greater than the following integer.
.RE
.B -l
.RS
Permits a given integer to be less than the following integer.
.RE
.SH EXAMPLES
It may help to think of the -e, -g, and -l options as equivalent to the
infix algebraic “=”, “>”, and “<” operators respectively, with each option
putting its symbol between every given integer. For example,
putting its symbol between every given integer. The following example is
equivalent to evaluating “1 < 2 < 3”:
.RS
.R intcmp -l 1 2 3
is equivalent to evaluating "1 < 2 < 3".
.RE
.SH DIAGNOSTICS
Intcmp exits 0 for a valid expression and 1 for an invalid expression.
.PP
Intcmp prints a debug message and exits with the appropriate sysexits(3) error
Intcmp prints a debug message and exits with the appropriate sysexits.h(3) error
code in the event of an error.
.SH BUGS
There are multiple ways to express compound comparisons; “less than or equal
to” can be -le or -el, for example.
.PP
The inequality comparison is -gl or -lg for “less than or greater than”; this
is elegant but unintuitive.
.PP
-egl, "equal to or less than or greater than", exits 0 no matter what for valid
-egl, equal to or less than or greater than, exits 0 no matter what for valid
program usage and may be abused to function as an integer validator.
Use str(1) instead.