show vlan: the vendor's column widths, and the rule line under the header #1583

Merged
jaylouisw merged 1 commit from rev/1116-0142 into main 2026-11-16 02:00:42 +00:00
Owner

show vlan padded the VLAN id to eight characters and printed no rule line, so Status sat at column 41 instead of 38 and the Ports list at 51 instead of 48 - every row three columns right of the heading above it.

Four Cisco command references print the same shape (Cisco IOS LAN Switching Command Reference, IOS XE 16.6 Catalyst 9400, IOS XE 16.1 Catalyst 3850, Catalyst 3650 16.2 - all show vlan):

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa0/1, Fa0/2
1002 fddi-default                     act/unsup
  • widths live once, in VLAN_COLUMNS; the header, the rule line and every row are built from it (vlanLine, vlanRule)
  • new test/show-vlan-table-shape.test.js (14 checks): the header and rule are the vendor strings, every dash group starts in its heading's column, and a row lands on 5/38/48 whatever the id and name are
  • test/show-vlan (29) and test/show-vlan-reserved-defaults (30) now read rows by column position instead of whitespace runs, because a four-character id leaves a single space before the name
  • research/show-vlan-columns.md records the evidence, plus the one thing not adopted: the Ports list is still not wrapped, because no source read here showed the continuation indent

Full suite: 261 suites, 9447 assertions, 0 failed. Syntax check 331 files.

`show vlan` padded the VLAN id to eight characters and printed no rule line, so `Status` sat at column 41 instead of 38 and the Ports list at 51 instead of 48 - every row three columns right of the heading above it. Four Cisco command references print the same shape (Cisco IOS LAN Switching Command Reference, IOS XE 16.6 Catalyst 9400, IOS XE 16.1 Catalyst 3850, Catalyst 3650 16.2 - all `show vlan`): ``` VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Fa0/1, Fa0/2 1002 fddi-default act/unsup ``` - widths live once, in `VLAN_COLUMNS`; the header, the rule line and every row are built from it (`vlanLine`, `vlanRule`) - new `test/show-vlan-table-shape.test.js` (14 checks): the header and rule are the vendor strings, every dash group starts in its heading's column, and a row lands on 5/38/48 whatever the id and name are - `test/show-vlan` (29) and `test/show-vlan-reserved-defaults` (30) now read rows by column position instead of whitespace runs, because a four-character id leaves a single space before the name - `research/show-vlan-columns.md` records the evidence, plus the one thing not adopted: the Ports list is still not wrapped, because no source read here showed the continuation indent Full suite: 261 suites, 9447 assertions, 0 failed. Syntax check 331 files.
show vlan: the vendor's column widths, and the rule line under the header
Some checks failed
CI / Classify the change (pull_request) Successful in 21s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 22s
CI / Docker build (pull_request) Failing after 11m33s
CI / Server smoke test (pull_request) Failing after 11m35s
CI / Test (Node 22) (pull_request) Failing after 11m37s
CI / Test (Node 20) (pull_request) Failing after 11m41s
CI / Test (Node 18) (pull_request) Failing after 11m46s
1991c89855
The table padded the VLAN id to eight characters and printed no rule line, so
Status sat at column 41 instead of 38 and the Ports list at 51 instead of 48 -
every row three columns right of the heading above it. Four Cisco command
references print the same shape:

  VLAN Name                             Status    Ports
  ---- -------------------------------- --------- -------------------------------

Widths live in one VLAN_COLUMNS list; the header, the rule line and every row are
built from it. research/show-vlan-columns.md records the evidence and the one
thing this run did not adopt: the Ports list is not wrapped, because the
continuation indent was not observable in any source read here.

Tests: show-vlan-table-shape (14 checks, new), show-vlan (29), show-vlan-reserved-
defaults (30, whose row parsing now reads the columns by position).
jaylouisw force-pushed rev/1116-0142 from 1991c89855
Some checks failed
CI / Classify the change (pull_request) Successful in 21s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 22s
CI / Docker build (pull_request) Failing after 11m33s
CI / Server smoke test (pull_request) Failing after 11m35s
CI / Test (Node 22) (pull_request) Failing after 11m37s
CI / Test (Node 20) (pull_request) Failing after 11m41s
CI / Test (Node 18) (pull_request) Failing after 11m46s
to f9ad73775e
Some checks failed
CI / Classify the change (pull_request) Successful in 16s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 18s
CI / Docker build (pull_request) Failing after 11m9s
CI / Server smoke test (pull_request) Failing after 11m16s
CI / Test (Node 22) (pull_request) Failing after 11m20s
CI / Test (Node 20) (pull_request) Failing after 11m25s
CI / Test (Node 18) (pull_request) Failing after 11m29s
2026-11-16 02:00:32 +00:00
Compare
jaylouisw deleted branch rev/1116-0142 2026-11-16 02:00:45 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaylouisw/packetforge!1583
No description provided.