Skip to content

fix(bind): old-style keynames, set: form, -m case (Refs #2914, #2915, #2916) - #2921

Merged
caomengxuan666 merged 3 commits into
masterfrom
fix/r74-residuals
Nov 6, 2026
Merged

caomengxuan666 merged 3 commits into
masterfrom
fix/r74-residuals

Conversation

@caomengxuan666

@caomengxuan666 caomengxuan666 commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Refs #2914, #2915, #2916 — r74 bind-face residuals (follow-up to #2913). UNVERIFIED-BY-CAPTAIN.

Fixes #2914
Fixes #2915
Fixes #2916

What

Three residuals from the r74 bind-face batch, all in rl_parse_and_bind's surface (lib/readline/bind.c:1594):

Pins: tests/issue2914_bind_old_style_keyname_regressions.rs (10), tests/issue2915_bind_set_colon_regressions.rs (5), tests/issue2916_bind_keymap_option_case_regressions.rs (4) — all fail-first on master (9/10, 4/5, 3/4 red; the green ones are parity controls), green on this branch.

本 PR 删除了什么

Nothing deleted. The change is additive: one new parse arm in src/builtins/bind.rs, a widened token rule in strip_set_keyword, and a case fold in the -m validation. No legacy path became unreachable.

Net lines

+608 / −30 (net +578) over 5 files: src/builtins/bind.rs and src/executor/bind_builtins.rs (the arm, the token rule, the case fold) plus the three new pin stems (+322 test lines).

Verification (lane-side, UNVERIFIED-BY-CAPTAIN)

  • Pins: issue2914 10/10, issue2915 5/5, issue2916 4/4 on this branch; fail-first on master 9/10, 4/5, 3/4 red (the green ones are parity controls).
  • Neighbourhood: r74 stems issue2871–issue2874 all green; full lib suite green.
  • Differential probes vs GNU bash 5.3.20 (script files under the lane workdir): the old-style class probe and the set:/-m probe are byte-identical to GNU; the edge probe differs only on Control-t: prefix-meta (see REPORT — GNU's keymap-valued ISKMAP bind has no kind in the flat registry model; the slot is occupied and listings agree apart from the prefix's sub-map rows).

…2914, #2915, #2916)

- parse_old_style_binding ports rl_parse_and_bind's old-style arm
  (lib/readline/bind.c:1803-1856): keyname after the last '-',
  glean_key_from_name (bind.c:2387), Control-/Meta- prefixes by
  case-insensitive substring scan (_rl_strindex, util.c:274),
  macro values, equivalency no-op, NULL-slot binds for unknown
  function names. The executor's positional loop registers the
  result instead of dropping non-quoted specs (rubash#2914).
- strip_set_keyword follows GNU's separator scan (bind.c:1637):
  the first token may end at ':' as well as whitespace, so
  'set: foo' reaches the variable arm (rubash#2915).
- bind -m resolves keymap names case-insensitively, matching
  rl_get_keymap_by_name (bind.c:2424) and the set keymap channel
  (rubash#2916); the diagnostic keeps the name as typed.
@caomengxuan666
caomengxuan666 marked this pull request as ready for review November 6, 2026 17:02
@caomengxuan666
caomengxuan666 merged commit 1fd251b into master Nov 6, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant