]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
units(1): Refactor the manual page and update usage information
author0mp <0mp@FreeBSD.org>
Mon, 3 Feb 2020 15:22:46 +0000 (15:22 +0000)
committer0mp <0mp@FreeBSD.org>
Mon, 3 Feb 2020 15:22:46 +0000 (15:22 +0000)
commit7c4ffda55d72fcd98910768c35ef1e9640796089
treefae9938b7049d537302f7e5e066cfea1e8c34ed5
parent4f89429eca71cd2487015a3458d4de37a32ada85
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
usr.bin/units/units.1
usr.bin/units/units.c