Skip to content

refactor(lexer): tidy disown_pair leftovers and scope the &! rule - #4523

Open
cestercian wants to merge 1 commit into
rtk-ai:developfrom
cestercian:fix/disown-pair-cleanup
Open

cestercian wants to merge 1 commit into
rtk-ai:developfrom
cestercian:fix/disown-pair-cleanup

Conversation

@cestercian

Copy link
Copy Markdown

Fixes #4517

Tidy disown_pair leftovers: drop the dead Arg arm, remove the duplicate check in contains_fish_only_construct, and apply the glued &! rule only for zsh (fish treats spaced and glued &! the same, so those scripts can stay attestable). Fish still refuses glued &| via opens_disown_pair.

Unit tests cover fish &! attestable vs zsh &! refused. cargo fmt and cargo clippy --all-targets -- -D warnings are clean; all discover::lexer tests pass. One unrelated guard_integration_test::git_log_malformed_digit_run_propagates_real_git_error failure remains (git 2.43 message wording vs the test expectation).

@rtk-wshm-sync-bot

Copy link
Copy Markdown

wshm · Automated triage by AI

📊 Automated PR Analysis

♻️ Type refactor
🟡 Risk medium

Summary

Cleans up leftover logic from a prior disown_pair refactor in the shell lexer: removes a dead Arg match arm and a duplicate &| check in contains_fish_only_construct, and narrows the glued &! unattestable rule to zsh only, since fish treats spaced and glued &! identically and can keep attesting those scripts. Fish still rejects glued &| via opens_disown_pair. Adds unit tests covering fish &! (attestable) vs zsh &! (refused), with cargo fmt/clippy clean and lexer tests passing.

Review Checklist

  • Tests present
  • Breaking change
  • Docs updated

Linked issues: #4517


Analyzed automatically by wshm · This is an automated analysis, not a human review.

@cestercian

Copy link
Copy Markdown
Author

Hey, just checking in on this, still happy to iterate on it.

@cursor
cursor Bot force-pushed the fix/disown-pair-cleanup branch from 155f5c9 to 5847658 Compare November 18, 2026 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

disown_pair: unreachable Arg arm, a redundant second call, and the &! rule applied to fish where both spellings agree

1 participant