cli: the show vlan Ports cell wraps at 80 columns, back under Ports at column 48 #1698
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!1698
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "rev/1116-1701"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Question
Where does the Ports cell of
show vlanbreak when the list fills the line - and does it break where a real box breaks it?research/show-vlan-columns.mdleft this open on purpose: the vendor pages read then had their leading whitespace collapsed by extraction, so the continuation indent was not observable and a wrap would have been a guess.Verdict: settled, and adopted
A box wraps the list at the console's 80 columns, the continuation starts back under the
Portsheading (column 48), and the break carries no comma. One rule reproduces every sample: the Ports cell has 80 - 48 = 32 columns of room, entries are joined by", ", and an entry that would overrun the window starts a new line.Worked checks against the published tables:
Gi1/0/xports:Gi1/0/2, Gi1/0/3, Gi1/0/4is 28 characters, a fourth would be 38 -> three to a line, exactly the sample's 16 groups.Fa0/xports:Fa0/1, Fa0/2, Fa0/3, Fa0/4is 26, a fifth would be 33 -> four to a line, exactly the sample's 6 groups.Gig0/1, Gig0/2tail takes its own line because the previous one was full.Sources: 2960X 15.2(6)E command reference, 2950 factory reset, Cisco lab 5.5.1 (PDF), howtonetwork 3550 transcript.
What changed
engine/cli.js:vlanRows()prints a row as its head plus one or more Ports lines;VLAN_TERMINAL_COLS(80),VLAN_PORTS_INDENT(48, computed fromVLAN_COLUMNS) andVLAN_PORTS_WIDTH(32) are the rule.test/show-vlan-ports-wrap.test.js(13 checks): the 2950 row character for character, the 2960X rhythm at three per line, the column-48 indent, the 80-column ceiling, no comma at the break, the whole list across the break, and a one-port VLAN staying on one line.show vlanreaders fold continuation lines into their row - a row is one or more printed lines.docs/CLI.mdandresearch/show-vlan-columns.md: the rule, the samples and what stays open.Gates
node scripts/syntax-check.js: 355 files OK. Fullnpm test: 284 suites, 10,148 assertions, 0 failed.Unresolved
terminal width, 0 = no wrap). Modelling a per-session width is a feature, not a fidelity fix.docs/CLI.mdsection still says a trunk appears in every VLAN its allowed list names, which contradicts the code, the section's own table row andresearch/vlan-brief-trunk-ports.md(a trunk appears in no row). Left for its own change.5c16a2a9ff4bb7d7799d