? is a keypress in two prompts and a syntax error in the other three; exit at # never leaves # #1503
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge#1503
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
What happens
The console prints the mode in its prompt —
>,#,(config)#,(config-if)#,(config-dhcp)#— and two keys a technician uses to find their way around only work in some of them.?is a keypress at>and#, and a syntax error everywhere elseThe one key that means "I do not know what I can type here" is reported as though the key itself were a typo. The index already labels every row with the mode it belongs in (
(config mode),(interface mode),(in a dhcp pool)), so the same list is the right answer in all five prompts.exitat#does nothingExec and privileged EXEC share one dispatcher, and only
exitat>is handled (as a no-op, because there is no login to leave). One level up from#is>, which this console always has underneath.What changes
engine/cli.js:_configMode,_ifaceModeand_dhcpPoolModeanswerhelp/?with the index before anything else;exitatMODE_ENABLEdemotes toMODE_EXEC, so the ladder(config-if)#→(config)#→#→>is continuous and each step is oneexit.docs/CLI.md§?is a keypress in every prompt, andexitwalks one level at a time.Not changed: a word the console does not know is still reported in every mode (
% Unrecognized config command: flurbish) — the fix is the two help keys and one level, not a general amnesty.Verification
test/help-key-works-in-every-prompt.test.js, nine checks: the index from?and fromhelpat all five prompts, the prompt unchanged afterwards, a command still working after asking for help, the fullexitladder, and the unknown-word reports in three modes. With the old handler: 4 passed / 5 failed. With this change: 9/9.Full suite 249 suites / 9144 assertions / 0 failed; syntax 319 files;
help-completeness8/8,config-undo48/48,skip-audit15/15.Also verified by hand this iteration
The CI steps that never ran for #1500/#1502 because the queue is wedged — run locally on the same tree:
check-dockerfile✓,examples/build-examples.js✓ (all four labs, ping OK),missing-devices.js examples --no-issues✓ (CI gate passed),check-control-bytes✓,check-node-surface✓,smoke-http.js✓ (all API checks clean).?is a keypress in every prompt, andexitwalks one level at a time #1504Landed on
mainas1b1e1287. Verified on the merge commit:help-key-works-in-every-prompt9/9,help-completeness8/8,config-undo48/48, tree clean (the full suite was 248 suites / 9137 assertions / 0 failed on the branch, and 249 / 9144 / 0 with #1502's suite rebased on top).The merge went through on the first attempt —
mergeablewastrue, so the volume had a free window. #1502 is still stuck:mergeablereadsfalseand a force-push of its rebased head was rejected withfailed to update ref, which is the same disk pressure in a different place.nothat names one thing must not remove another #1502