Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughIntroduces a completion delegation function that properly adjusts all bash completion variables (COMP_WORDS, COMP_CWORD, COMP_LINE, COMP_POINT) when delegating to git-gtr, replacing direct function calls with unified function invocation. Adds test coverage for wrapper completion across varying input lengths. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
averyjennings
left a comment
There was a problem hiding this comment.
Clean fix for the COMP_LINE/COMP_POINT consistency bug. The extracted delegate helper is the right call — DRYs up both delegation sites and makes the rewrite logic easy to audit in one place. Arithmetic is correct for all realistic wrapper name lengths, and the tests are well-designed (eval the generated code, mock _git_gtr, verify all four completion variables). No blockers.
Summary
COMP_LINEandCOMP_POINTwhen the bashgtrwrapper delegates completion to_git_gtrnew --cdbehavior while sharing the delegation logicCloses #156.
Testing
bats tests/init.batsbats tests/git gtr new test-feature,git gtr new feature/auth,git gtr list,git gtr go test-feature,git gtr run test-feature git status --short,git gtr rm test-feature feature/auth --yesgit gtr init bash, invoke_gtr_completionforgtr ai fe, and verify delegated state becomesgit gtr ai fewithCOMP_POINT=13Summary by CodeRabbit
Refactor
Tests