Bug 241985 - ex(1)/vi(1)/view(1) man page mentions broken options and refers to invalid section
Summary: ex(1)/vi(1)/view(1) man page mentions broken options and refers to invalid se...
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Baptiste Daroussin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-15 16:04 UTC by Tim Chase
Modified: 2020-10-01 05:25 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Chase 2019-11-15 16:04:00 UTC
1) The current man page lists a "-w size" flag to set the window size

    ex [-FRrSsv] [-c cmd] [-t tag] [-w size] [file ...]
    vi  [-eFRrS] [-c cmd] [-t tag] [-w size] [file ...]
    view [-eFrS] [-c cmd] [-t tag] [-w size] [file ...]

However attempting to invoke ex/vi/view with "-w $SIZE" gives an error message:

    $ vi -w 10 a.txt b.txt
    set: no 23 option: 'set all' gives all option values

(same with invoking as ex or view)  As best I can tell, either the "-w" option doesn't work, has side-effects, or is improperly documented.  I suspect that the solution is to just remove the references to the "-w size" option.


2) Under the ASYNCHRONOUS EVENTS section's SIGWINCH, the reader is referred to the "vi/ex reference manual section Sizing the Screen" but AFAICT, either there is no vi/ex reference manual (if it's referring to an external document) or if that document is the self-same man-page, there is no "Sizing the Screen" section.  I'm not sure whether the proper resolution is to add a Sizing the Screen section to the current man-page, or to remove that cross-reference. Or, if it is an external document, providing details on the file-path to the "reference manual".
Comment 1 Fernando Apesteguía freebsd_committer 2020-08-22 17:56:34 UTC
review D26158
Comment 2 Fernando Apesteguía freebsd_committer 2020-08-22 17:59:23 UTC
(In reply to Tim Chase from comment #0)
Hi Tim,

The external document the manual page is referring to is this one:
https://docs.freebsd.org/44doc/usd/13.viref/paper.pdf

Cheers!
Comment 3 Tim Chase 2020-08-22 20:47:13 UTC
(In reply to Fernando Apesteguía from comment #2)


Thanks for both fixing the `-w` and for the link to the article referenced in the man-page.  Would it make sense to include this URL in the man-page as well?  Especially since this PDF is hosted on the FreeBSD site.

(PS: and there was some weird rendering issue viewing that PDF in Chromium, though it appears to render fine in Firefox & `xpdf`, but that's a separate issue)
Comment 4 Fernando Apesteguía freebsd_committer 2020-08-23 11:06:27 UTC
(In reply to Tim Chase from comment #3)
Absolutely,

review D26163
Comment 5 Fernando Apesteguía freebsd_committer 2020-09-26 16:52:12 UTC
man committed in base r366148.
Change sent upstream: https://github.com/lichray/nvi2/pull/85
Comment 6 Fernando Apesteguía freebsd_committer 2020-09-26 16:52:31 UTC
man committed in base r366148.
Change sent upstream: https://github.com/lichray/nvi2/pull/85
Comment 7 Fernando Apesteguía freebsd_committer 2020-09-28 18:01:16 UTC
Both changes have been merged upstream:

https://github.com/lichray/nvi2/pull/85
https://github.com/lichray/nvi2/pull/86
Comment 8 commit-hook freebsd_committer 2020-10-01 04:26:14 UTC
A commit references this bug:

Author: bapt
Date: Thu Oct  1 04:26:00 UTC 2020
New revision: 366307
URL: https://svnweb.freebsd.org/changeset/base/366307

Log:
  Import nvi 2.2.0-05ed8b9

  This snapshot just brings a bunch of fixes in particular a fix for vi -w

  PR:		241985
  Reported by:	fernape

Changes:
  vendor/nvi/dist/CMakeLists.txt
  vendor/nvi/dist/catalog/dump.c
  vendor/nvi/dist/cl/cl.h
  vendor/nvi/dist/cl/cl_read.c
  vendor/nvi/dist/cl/cl_term.c
  vendor/nvi/dist/common/common.h
  vendor/nvi/dist/common/cut.h
  vendor/nvi/dist/common/exf.c
  vendor/nvi/dist/common/key.c
  vendor/nvi/dist/common/log.c
  vendor/nvi/dist/common/main.c
  vendor/nvi/dist/common/mark.c
  vendor/nvi/dist/common/mem.h
  vendor/nvi/dist/common/msg.c
  vendor/nvi/dist/common/options.c
  vendor/nvi/dist/common/put.c
  vendor/nvi/dist/common/recover.c
  vendor/nvi/dist/common/util.c
  vendor/nvi/dist/ex/ex.c
  vendor/nvi/dist/ex/ex.h
  vendor/nvi/dist/ex/ex_argv.c
  vendor/nvi/dist/ex/ex_bang.c
  vendor/nvi/dist/ex/ex_cscope.c
  vendor/nvi/dist/ex/ex_filter.c
  vendor/nvi/dist/ex/ex_global.c
  vendor/nvi/dist/ex/ex_script.c
  vendor/nvi/dist/ex/ex_shell.c
  vendor/nvi/dist/ex/ex_subst.c
  vendor/nvi/dist/files/config.h.in
  vendor/nvi/dist/files/pathnames.h.in
  vendor/nvi/dist/man/vi.1
  vendor/nvi/dist/regex/engine.c
  vendor/nvi/dist/regex/regexec.c
  vendor/nvi/dist/vi/v_itxt.c
  vendor/nvi/dist/vi/v_paragraph.c
  vendor/nvi/dist/vi/v_section.c
  vendor/nvi/dist/vi/v_sentence.c
  vendor/nvi/dist/vi/v_txt.c
  vendor/nvi/dist/vi/vi.c
  vendor/nvi/dist/vi/vs_line.c
  vendor/nvi/dist/vi/vs_msg.c
  vendor/nvi/dist/vi/vs_refresh.c
  vendor/nvi/dist/vi/vs_relative.c
  vendor/nvi/dist/vi/vs_smap.c
Comment 9 commit-hook freebsd_committer 2020-10-01 04:47:19 UTC
A commit references this bug:

Author: bapt
Date: Thu Oct  1 04:46:29 UTC 2020
New revision: 366309
URL: https://svnweb.freebsd.org/changeset/base/366309

Log:
  Update nvi to 2.2.0-05ed8b9

  This version incorporates many fixes in particular a fix for vi -w
  Another approach was proposed to merge those fixes (see review), I find
  it easier to track changes if we keep importing snapshot on regular
  basis

  PR:		241985
  Reported by:	fernape
  Differential Revision:	https://reviews.freebsd.org/D26158

Changes:
_U  head/contrib/nvi/
  head/contrib/nvi/CMakeLists.txt
  head/contrib/nvi/catalog/dump.c
  head/contrib/nvi/cl/cl.h
  head/contrib/nvi/cl/cl_read.c
  head/contrib/nvi/cl/cl_term.c
  head/contrib/nvi/common/common.h
  head/contrib/nvi/common/cut.h
  head/contrib/nvi/common/exf.c
  head/contrib/nvi/common/key.c
  head/contrib/nvi/common/log.c
  head/contrib/nvi/common/main.c
  head/contrib/nvi/common/mark.c
  head/contrib/nvi/common/mem.h
  head/contrib/nvi/common/msg.c
  head/contrib/nvi/common/options.c
  head/contrib/nvi/common/put.c
  head/contrib/nvi/common/recover.c
  head/contrib/nvi/common/util.c
  head/contrib/nvi/ex/ex.c
  head/contrib/nvi/ex/ex.h
  head/contrib/nvi/ex/ex_argv.c
  head/contrib/nvi/ex/ex_bang.c
  head/contrib/nvi/ex/ex_cscope.c
  head/contrib/nvi/ex/ex_filter.c
  head/contrib/nvi/ex/ex_global.c
  head/contrib/nvi/ex/ex_script.c
  head/contrib/nvi/ex/ex_shell.c
  head/contrib/nvi/ex/ex_subst.c
  head/contrib/nvi/files/config.h.in
  head/contrib/nvi/files/pathnames.h.in
  head/contrib/nvi/regex/engine.c
  head/contrib/nvi/regex/regexec.c
  head/contrib/nvi/vi/v_itxt.c
  head/contrib/nvi/vi/v_paragraph.c
  head/contrib/nvi/vi/v_section.c
  head/contrib/nvi/vi/v_sentence.c
  head/contrib/nvi/vi/v_txt.c
  head/contrib/nvi/vi/vi.c
  head/contrib/nvi/vi/vs_line.c
  head/contrib/nvi/vi/vs_msg.c
  head/contrib/nvi/vi/vs_refresh.c
  head/contrib/nvi/vi/vs_relative.c
  head/contrib/nvi/vi/vs_smap.c
  head/usr.bin/vi/catalog/Makefile
  head/usr.bin/vi/pathnames.h
Comment 10 Fernando Apesteguía freebsd_committer 2020-10-01 05:25:25 UTC
^Triage: Assign to committer resolving