fix: show helpful error when running git gtr cd#137
Conversation
`cd` only works through the shell function wrapper (`gtr cd`) since subprocesses cannot change the parent shell's directory. Instead of the generic "Unknown command" error, detect `cd` and print setup instructions with the user's shell auto-detected.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
WalkthroughAdds a dedicated handler for the "cd" command within the main command dispatcher. When invoked, the handler determines the shell name, emits an error message indicating cd requires shell integration, and suggests initialization via Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Summary
git gtr cdnow shows a clear error explaining why it doesn't work (subprocess limitation) instead of the generic "Unknown command" messageeval "$(git gtr init <shell>)"setup command, auto-detecting the user's shellgtr cd(the shell function wrapper) insteadBefore
After
Test plan
git gtr cdshows helpful error with shell-specific setup instructionsgtr cd(shell wrapper) still works normallySummary by CodeRabbit
Release Notes