HomeFreeBSD

units(1): Refactor the manual page and update usage information

Description

units(1): Refactor the manual page and update usage information

Changes to units.1:

  • Change the description to a more descriptive "conversion calculator".
  • Sort options.
  • Split the description into sections to make it easier to navigate the manual page.
  • Improve the description of various options.
  • Document the default value of the output format.
  • Use more mdoc macros for better readability.
  • Document the behavior of the PATH environmental variable.
  • Improve examples.
  • Add sections: EXIT STATUS, DIAGNOSTICS, and HISTORY.
  • Document that units(1) cannot convert negative values and it handles long unit lists poorly.
  • Update the documentation of the -V flag to match the implementation. units(1) prints its version and the units data file instead of its version and usage information.

Changes to units.c:

  • Update usage information.
  • Sort longopts elements.

This commit does not attempts to change the current behavior of units(1).
What's left to do is probably defining a better versioning (at the moment
units(1) always reports "FreeBSD units" as its version) and changing the
behavior of the -V flag to only print version.

Reviewed by: allanjude (earlier version), bcr
Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D18977

Details

Provenance
0mpAuthored on
Reviewer
allanjude
Differential Revision
D18977: units(1): Refactor the manual and update usage information
Parents
rS357448: Remove the GICv3 ITS irq and replace it with an ID
Branches
Unknown
Tags
Unknown