-
Notifications
You must be signed in to change notification settings - Fork 44
Add instructions for enabling fish shell completions for git gtr #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdded informational output to a setup script that instructs how to enable Fish shell completions for the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
Pre-merge checks and finishing touchesCaution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error)
✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
templates/setup-example.sh (1)
36-40: Quote the example path for consistency with coding guidelines.While line 39 contains example text that users will customize, the path should be quoted per the shell scripting guidelines to handle potential spaces and special characters.
Apply this diff to quote the path:
echo "To enable fish shell completions for git gtr, run:" - echo " ln -s /path/to/git-worktree-runner/completions/gtr.fish ~/.config/fish/completions/" + echo " ln -s \"/path/to/git-worktree-runner/completions/gtr.fish\" ~/.config/fish/completions/" echo "Then reload fish with: exec fish"As a secondary note: The file's shebang on line 1 is
#!/bin/sh, but per your coding guidelines it should be#!/usr/bin/env bash. This is a pre-existing issue and may be intentional for portability, but worth considering for a future update.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
templates/setup-example.sh(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.sh
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.sh: Always quote paths to handle spaces and special characters; avoid unguarded globbing
Keepset -eactive in shell scripts; ensure non-critical failures are guarded withcommand || true
**/*.sh: Use shebang#!/usr/bin/env bash(not/bin/bashor/bin/sh)
Usesnake_casenaming for functions
Usesnake_casefor local variables andUPPER_CASEfor constants/environment variables
Use 2-space indentation (no tabs)
Always quote variables and paths to handle spaces and special characters
Check return codes and use|| exit 1or|| return 1for error handling
Uselocalfor function-scoped variables to avoid polluting global namespace
Target Bash 3.2+ compatibility in shell scripts
Files:
templates/setup-example.sh
**/*.{bash,fish,sh}
📄 CodeRabbit inference engine (.github/instructions/sh.instructions.md)
**/*.{bash,fish,sh}: Bash 3.2+ compatible (macOS default), but 4.0+ features allowed where appropriate
Always quote variables: use"$var"not$var
Use function-scoped variables:local var="value"
Check return codes; functions return 1 on failure
Usesnake_casefor functions and variables,UPPER_CASEfor constants
Prefer[ ]over[[ ]]for POSIX portability; use[[only when needed
Always quote glob inputs; disable unintended globbing withset -ftemporarily if required
Avoid associative arrays in shell scripts; use simple string/loop constructs for Bash 3.2+ compatibility
Avoidreadarrayand process substitution unsupported in older Bash
Debug withbash -x ./bin/gtr <cmd>or wrap suspicious blocks withset -x/set +x
Check function presence withdeclare -f create_worktreeordeclare -f resolve_target
Use stderr for variable inspection:echo "DEBUG var=$var" >&2to keep stdout clean for command substitution
Keep dependencies minimal: only usegit,sed,awk,find,grep; avoid jq/curl unless justified
Check availability of external commands before use when adding new tools
Use"${var}"for variable expansion; for line loops usewhile IFS= read -r line; do ... doneto preserve spaces
Sanitize branch names viasanitize_branch_namefunction; do NOT duplicate logic elsewhere
Everything is sourced at startup withset -eenabled; functions call each other directly; no subshells except for hooks and AI tools
Files:
templates/setup-example.sh
🔇 Additional comments (1)
templates/setup-example.sh (1)
37-40: The informational content is clear and helpful.The added Fish shell completion instructions are well-placed at the end of the script and don't disrupt the existing flow. The tone matches the existing output style with the emoji and confirmation messaging.
|
@coderabbitai clone the repo and give me a summary of the last 20 commits on main. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: Length of output: 4546 @hasit Here's a summary of the last 20 commits on the main branch: 📊 Commit Summary (Nov 13 - Dec 10, 2025)🎯 Recent Features (December 2025)
🔧 Bug Fixes
🤖 Adapter Additions
📚 Documentation
🏷️ Version Milestones
⚙️ Project Infrastructure
Key contributors: Tom Elizaga, Nato Boram, Ed Harrod, Hiroki Nakashima, Ryodai Ueyama, and others. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
.coderabbit.yaml(1 hunks)
🔇 Additional comments (1)
.coderabbit.yaml (1)
19-25: Well-structured shell-check custom pre-merge rule.The new custom check is properly configured with appropriate mode set to "error" to enforce shell script quality standards. The instructions clearly specify that shell scripts must be syntactically valid and provide examples for multiple shells (bash, zsh, fish, etc.), which aligns well with the PR's goal of improving Fish shell support.
| pre_merge_checks: | ||
| custom_checks: | ||
| - mode: error | ||
| name: shell-check | ||
| instructions: | | ||
| - Always check if the shell scripts are valid and sytactically correct. | ||
| - Make sure there are examples for all the supported shells, such as bash, zsh, fish, etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix typo in instruction text.
Line 24 contains a spelling error: "sytactically" should be "syntactically".
- - Always check if the shell scripts are valid and sytactically correct.
+ - Always check if the shell scripts are valid and syntactically correct.🤖 Prompt for AI Agents
In .coderabbit.yaml around lines 19 to 25, fix the spelling error in the
custom_checks instructions: replace "sytactically" with "syntactically" in the
sentence "- Always check if the shell scripts are valid and sytactically
correct." so the line reads "- Always check if the shell scripts are valid and
syntactically correct."
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.