cli: a config command word shortens to what is still unique (host r1, vla 20, sp, do sh) #1740
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!1740
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "rev/1116-2200"
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 a shortened config-mode command word resolve the way a shortened EXEC one does, and against what table?
Sources
Router(config)#int gi0/1accepted anddo sh runrunning the view, whilesh runat(config)#is refused: https://www.connecteddots.online/resources/cisco/invalid-input-detected-at-markerD11(config)#do sh run int g0/1,SW1(config)#do sh run int gi0/1from four boxes: https://community.cisco.com/t5/routing/hsrp-standby-router-is-unknow/td-p/4602792Verdict
Known, and it was wrong here. A box accepts any unique prefix of the first word of a config line; this console accepted exactly one (
int, hard-coded) and refusedhost r1,vla 20,sp priority 4096,do sh ver.Changed
engine/cli.js:CONFIG_WORDS(21 entries, everywordahead ===the config dispatcher compares against) +resolveCommandWordat the head of_configMode(); the word afterdoresolves againstEXEC_WORDS.% Ambiguous config command "i": interface | ip | ipv6 (type more characters)- and the mode is left alone.test/command-word-abbreviation.test.js: +54 assertions (74 -> 128) - shortened lines answer byte-for-byte as the whole spelling, ambiguity leavesmode === "config",enablkeeps its old refusal, and the second word of a config line is still not resolved (ip ro ...,no vla 20) so the boundary stays a decision.docs/CLI.mdandresearch/command-word-abbreviation.mdupdated.Tests
node scripts/syntax-check.js: 364 files, all OKnpm test: 293 suites, 10452 assertions, 0 failedUnresolved
(config-if)#has no table yet (ip add,sw mo acc,desc,do sh runstill refused) - next pass, same shape.showis accepted at(config)#here where a box refuses it (pre-existing;sh vernow rides on that).enat(config)#isendhere; a box also hasenable password, so it would call it ambiguous.