Bug 209876 - [patch] units(1) The man page and source disagree on the long version of '-H'
Summary: [patch] units(1) The man page and source disagree on the long version of '-H'
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Documentation (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Sevan Janiyan
URL: https://reviews.freebsd.org/D11988
Keywords: patch
Depends on:
Blocks:
 
Reported: 2016-05-30 23:15 UTC by kdrakehp
Modified: 2017-08-12 12:19 UTC (History)
1 user (show)

See Also:


Attachments
Patch to correct the long option listed in units.1 (539 bytes, patch)
2016-05-30 23:15 UTC, kdrakehp
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description kdrakehp 2016-05-30 23:15:51 UTC
Created attachment 170847 [details]
Patch to correct the long option listed in units.1

units(1) does not accept the '--historyfile' long option as documented in the man page, it accepts the long option '--history'.  The man page says these options are "for compatibility with GNU units", and the GNU units documentation agrees with the implemented option '--history'.


From the man page
     -H filename , --historyfile filename
             Ignored, for compatibility with GNU units.

From the source, in the 'longopts' array
        {"history", required_argument, NULL, 'H'},


How to reproduce:

$ units --historyfile filename </dev/null >/dev/null
units: unrecognized option `--historyfile'
usage: units [-f unitsfile] [-H historyfile] [-UVq] [from-unit to-unit]

$ units --history filename </dev/null >/dev/null
Comment 1 commit-hook freebsd_committer 2017-08-12 12:18:25 UTC
A commit references this bug:

Author: sevan
Date: Sat Aug 12 12:17:38 UTC 2017
New revision: 322424
URL: https://svnweb.freebsd.org/changeset/base/322424

Log:
  Correct the -H longopt equivillant

  PR:		209876
  Submitted by:	<kdrakehp AT zoho DOT com>
  Approved by:	bcr (mentor)
  Differential Revision:	https://reviews.freebsd.org/D11988

Changes:
  head/usr.bin/units/units.1
Comment 2 Sevan Janiyan freebsd_committer 2017-08-12 12:19:18 UTC
Committed, thank you for the contribution.