cli(show): a view word with nothing after it is incomplete, not invalid #2444

Merged
jaylouisw merged 1 commit from rev/1121-1542 into main 2026-11-21 16:09:10 +00:00
Owner

Question

When the first word of a show line is a word the box knows but the line is still not complete — show with no view, or show mac / show power — is the refusal % Invalid … or % Incomplete command.?

Evidence

  • Cisco CLI error-message table (Catalyst 9200 IOS XE 17.18.x, "Using the Command-Line Interface", Table 3): % Incomplete command. = "You did not enter all the keywords or values required by this command"; % Invalid input detected at '^' marker. = "You entered the command incorrectly". Same table in the 15.2(7)E 2960-X and 17.15.x 9600 references.
  • Cisco Community 3750 transcript: SW1#clear mac address-table → % Incomplete command. — a known keyword chain one word short, which is exactly the shape of show mac.

Before / after

sw1#show
% Invalid show command: (empty)          ->  % Incomplete command: name a view after `show` (type `show ?` for the list)
sw1#show mac
% Invalid show command: mac             ->  % Incomplete command: `show mac` is a view word with nothing after it - the box says `show mac address-table`
sw1#show pow
% Invalid show command: power           ->  % Incomplete command: `show pow` is a view word with nothing after it - the box says `show power inline`

The console already carried both completions in SHOW_VIEW_TAILS, and show ? prints both rows as completions of show . The spelling echoed back is the one typed. Unchanged: an unknown word is still % Invalid show command: <word>, show po is still ambiguous, and show mac address-table / show power inline print as before. do show in config mode takes the same path.

Tests

  • test/show-incomplete-view-word.test.js — 23 checks (old handler: 9 passed / 14 failed).
  • node scripts/syntax-check.js — 541 files, all OK.
  • npm test — 461 suites, 15598 assertions, 0 failed.

Left open

  • The vendor sentence stops at the full stop; this console keeps its usual hint after % Incomplete command: (house style, recorded in the research note).
  • Tail abbreviation (show mac addr) and a capitalised tail (show mac Address-Table) are still refused — a different question, asked of the tail rather than of the missing word.

research/show-incomplete-view-word.md has the sources, the inference and what would settle the rest.

## Question When the first word of a `show` line is a word the box knows but the line is still not complete — `show` with no view, or `show mac` / `show power` — is the refusal `% Invalid …` or `% Incomplete command.`? ## Evidence - Cisco CLI error-message table (Catalyst 9200 IOS XE 17.18.x, "Using the Command-Line Interface", Table 3): `% Incomplete command.` = "You did not enter all the keywords or values required by this command"; `% Invalid input detected at '^' marker.` = "You entered the command incorrectly". Same table in the 15.2(7)E 2960-X and 17.15.x 9600 references. - Cisco Community 3750 transcript: `SW1#clear mac address-table` → `% Incomplete command.` — a known keyword chain one word short, which is exactly the shape of `show mac`. ## Before / after ``` sw1#show % Invalid show command: (empty) -> % Incomplete command: name a view after `show` (type `show ?` for the list) sw1#show mac % Invalid show command: mac -> % Incomplete command: `show mac` is a view word with nothing after it - the box says `show mac address-table` sw1#show pow % Invalid show command: power -> % Incomplete command: `show pow` is a view word with nothing after it - the box says `show power inline` ``` The console already carried both completions in `SHOW_VIEW_TAILS`, and `show ?` prints both rows as completions of `show `. The spelling echoed back is the one typed. Unchanged: an unknown word is still `% Invalid show command: <word>`, `show po` is still ambiguous, and `show mac address-table` / `show power inline` print as before. `do show` in config mode takes the same path. ## Tests - `test/show-incomplete-view-word.test.js` — 23 checks (old handler: 9 passed / 14 failed). - `node scripts/syntax-check.js` — 541 files, all OK. - `npm test` — 461 suites, 15598 assertions, 0 failed. ## Left open - The vendor sentence stops at the full stop; this console keeps its usual hint after `% Incomplete command:` (house style, recorded in the research note). - Tail abbreviation (`show mac addr`) and a capitalised tail (`show mac Address-Table`) are still refused — a different question, asked of the tail rather than of the missing word. `research/show-incomplete-view-word.md` has the sources, the inference and what would settle the rest.
cli(show): a view word with nothing after it is incomplete, not invalid
All checks were successful
CI / Server smoke and Docker build (pull_request) Successful in 28s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 6s
CI / Test (Node 20) (pull_request) Successful in 1m7s
CI / Test (Node 22) (pull_request) Successful in 1m7s
CI / Test (Node 18) (pull_request) Successful in 1m8s
CI / Arm auto-merge (pull_request) Successful in 3s
1b426b64f2
A bare `show` answered `% Invalid show command: (empty)`, and `show mac` / `show power` answered
`% Invalid show command: mac` / `… power` — though both are doors whose command is the rest of the line
(`show mac address-table`, `show power inline`), the same two rows `show ?` prints with their extra words.

IOS separates the faults: `% Invalid input detected at '^' marker.` is a word the parser does not know at
that position, while `% Incomplete command.` means not all of the keywords were entered (Command Reference
IOS XE 17.18.x, Catalyst 9200, "Using the Command-Line Interface", Table 3), and a 3750 transcript shows that
sentence for a keyword chain one word short (`clear mac address-table`).

All three now answer `% Incomplete command: …` naming the completion, echoing the spelling typed. An unknown
word is still invalid, an ambiguous prefix is still ambiguous, and both completed views print as before.

test/show-incomplete-view-word.test.js: 23 checks (old handler 9 passed / 14 failed).
npm test: 461 suites, 15598 assertions, 0 failed.
forgejo-actions scheduled this pull request to auto merge when all checks succeed 2026-11-21 15:52:43 +00:00
forgejo-actions canceled auto merging this pull request when all checks succeed 2026-11-21 16:00:44 +00:00
forgejo-actions scheduled this pull request to auto merge when all checks succeed 2026-11-21 16:00:45 +00:00
jaylouisw deleted branch rev/1121-1542 2026-11-21 16:09:11 +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!2444
No description provided.