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: Books & Articles (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 kd-dev
Modified: 2018-03-03 09:59 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, kd-dev
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description kd-dev 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 freebsd_triage 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 freebsd_triage 2017-08-12 12:19:18 UTC
Committed, thank you for the contribution.
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-03-03 09:59:28 UTC
A commit references this bug:

Author: eadler
Date: Sat Mar  3 09:59:05 UTC 2018
New revision: 330314
URL: https://svnweb.freebsd.org/changeset/base/330314

Log:
  MFC r322424:

  Correct the -H longopt equivillant

  PR:		209876

Changes:
_U  stable/11/
  stable/11/usr.bin/units/units.1