bugGNU troff - Bugs: bug #60943, [nroff] should accept whitespace...


bug #60943: [nroff] should accept whitespace between option and option argument

Submitted by:  G. Branden Robinson <gbranden>
Submitted on:  Mon 19 Jul 2021 04:08:26 PM UTC  
Category:  None Severity:  1 - Wish
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  G. Branden Robinson <gbranden>
Open/Closed:  Closed Planned Release:  1.23.0

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Mon 19 Jul 2021 06:37:01 PM UTC, comment #1: 

commit 2b955c571c6b62a16f710961094c68928d74a0c4
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Tue Jul 20 02:47:42 2021 +1000

    [nroff]: Fix Savannah #60943.

    * src/roff/nroff/nroff.sh: Add new `is_option_argument_pending` flag to
      add an additional state to the option parser.  Set it if an
      argument-requiring option is encountered with no abutting argument.
      If it is set when a new argument is encountered, absorb the argument
      into the groff option list and clear the flag.  Moderize script in a
      couple of other ways.
      - Exit with status 2 upon usage errors so that this is
        condition is easily distinguished form a groff abort (which
        exits with status 1).
      - Test shell variables for non-nullity with test(1) -n operator
        instead of a string comparison.

    * src/roff/nroff/tests/verbose_option_works.sh: Test correct
      construction of groff command using this input form.

    * src/roff/nroff/nroff.1.man (Options): Add spaces between option flags
      and option arguments.  Sync metasyntactic variable names with groff(1)
      while we're at it.

      (Description): Drop sentence warning of whitespace prohibition.

      (Exit status): Add new section.

    * NEWS: Add item since the interface changed.

    Fixes <https://savannah.gnu.org/bugs/?60943>.

G. Branden Robinson <gbranden>
Project AdministratorIn charge of this item.
Mon 19 Jul 2021 04:08:26 PM UTC, original submission:  

Our nroff(1) page says "Whitespace is not permitted between an option and its argument."

This is lame, and inconsistent with most or all other programs shipping with GNU roff.

And it's not hard to fix.

G. Branden Robinson <gbranden>
Project AdministratorIn charge of this item.


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by gbranden (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-07-19 gbranden StatusIn Progress => Fixed
        Open/ClosedOpen => Closed
        Planned ReleaseNone => 1.23.0

    Back to the top

    Powered by Savane 3.7