cli(show): a keyword after show is matched in any case, as a box matches it #2513
No reviewers
Labels
No labels
blocked-on-build
bug
device
device-request
enhancement
from-github
needs-datasheet
needs-info
needs-triage
ready-for-agent
ready-for-human
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!2513
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "rev/1124-0212"
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
Does an IOS-like box match a command's keywords in any case - and did this console?
Verdict
Known, and it was wrong here. IOS: "You can enter commands in uppercase, lowercase, or mixed case. Only passwords
are case sensitive" and "Cisco IOS commands are generally case-insensitive"
(15.1S Configuration Fundamentals, Using the CLI); "Commands are not case-sensitive" (5900 ESW 15.2(4)GC).
This console folded the first word of a
showline only:show ip ARP/show POWER INLINEreached theirviews (compared lowercased), while
show ip ROUTE,show ip interface BRIEF,show ip DHCP binding,show ipv6 NDandshow mac ADDRESS-TABLEwere refused with% Invalid show command: ...- the sentence for aview the console does not have - about views it does have.
Changed
engine/cli.js:_show()builds one lowercased copy of the line (kw) and the view branches compare throughit (nat, interface+brief, route, dns, dhcp, ospf, bgp, ipv6 nd, mac address-table). Values are untouched.
test/show-keyword-case.test.js: 37 checks - eleven case variants equal their lower-case twins byte for byte,the real route/brief tables behind the capitalised spellings, refusals (
show ip FLURB,show i) unmoved, andthe letter of a typed value preserved in the refusal.
research/show-keyword-case.md: sources, before/after measurements, and what is still open (an interfacename as opposed to the keyword; tail abbreviation; the caret sentence).
docs/CLI.md,CHANGELOG.md, and the tail-case bullet inresearch/show-incomplete-view-word.md, which hadrecorded
show mac Address-Tableas open.Gates
node scripts/syntax-check.js- 562 files, all OK.--concurrency=8, 288.8 s);npm test's audits(port types, devices, control bytes) also clean. Ledger citations checker unchanged (same 4 tolerated drift
suspects as on
main).showis matched in any case, as a box matches it