feat(fish): prioritize ~/.local/bin in PATH - #264
Conversation
Add ~/.local/bin as the first entry in Fish shell PATH configuration to ensure standalone binaries installed there take precedence over wrapper scripts from other package managers like Bun. This resolves conflicts where Bun-installed wrapper scripts in ~/.bun/bin may fail to locate their node_modules dependencies, while the standalone binary in ~/.local/bin works correctly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Summary of ChangesHello @shunkakinoki, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the Fish shell configuration by prioritizing the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a command resolution issue by prioritizing ~/.local/bin in the Fish shell PATH configuration. The change ensures standalone binaries take precedence over wrapper scripts from package managers like Bun.
- Add
~/.local/binas the first PATH entry in both login and interactive shell initialization - Resolves issue where
open-composerwrapper script fails while standalone binary works correctly
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| fish_add_path -p ~/.local/bin | ||
| fish_add_path -p ~/.bun/bin |
There was a problem hiding this comment.
The same PATH configuration is duplicated between loginShellInit and interactiveShellInit. Consider extracting this into a shared variable or function to reduce duplication and ensure consistency.
|
Warning Rate limit exceeded@shunkakinoki has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 3 minutes and 31 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. 📝 WalkthroughSummary by CodeRabbit
WalkthroughAdded fish shell PATH entries for ~/.local/bin in both loginShellInit and interactiveShellInit within the Home Manager fish configuration. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~6 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request correctly prioritizes ~/.local/bin in the Fish shell's PATH to resolve an issue with command precedence. The change is applied to both login and interactive shell initializations. However, this approach introduces code duplication. My review includes a suggestion to refactor the configuration to remove this duplication, which will improve the long-term maintainability of the file.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
| loginShellInit = '' | ||
| fish_add_path -p ~/.local/bin | ||
| fish_add_path -p ~/.bun/bin | ||
| fish_add_path -p ~/.nix-profile/bin | ||
| fish_add_path -p /nix/var/nix/profiles/default/bin |
There was a problem hiding this comment.
fish_add_path order keeps ~/.local/bin lowest priority
fish_add_path -p prepends each path to the front of $PATH, so later calls have higher precedence than earlier ones. Because this block ends with /etc/profiles/per-user/... and ~/.bun/bin, inserting fish_add_path -p ~/.local/bin at the top still leaves ~/.local/bin behind ~/.bun/bin in the final PATH. The change therefore does not fix the stated issue—open-composer will still resolve to the bun wrapper. To actually prioritize ~/.local/bin, it needs to be the last -p call (or the others should append instead).
Useful? React with 👍 / 👎.
Update home.sessionPath to include ~/.local/bin before ~/.bun/bin. This ensures the session-level PATH is correctly ordered, as sessionPath takes precedence over shell-specific PATH modifications. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Update the comment in home.sessionPath to clarify that local and bun bins are added to the PATH without specifying prioritization. This enhances readability while maintaining the existing functionality. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Summary
~/.local/binas the first entry in Fish shell PATH configurationProblem
The
open-composercommand was failing because:~/.bun/bin/open-composer(wrapper script) appears first in PATH~/.local/bin/open-composer(standalone binary) works correctly but appears laterSolution
Prioritize
~/.local/binin bothloginShellInitandinteractiveShellInitby adding it before~/.bun/binin the PATH.Test plan
make switchwhich open-composerreturns~/.local/bin/open-composeropen-composer --versionruns successfully🤖 Generated with Claude Code
Summary by cubic
Prioritized ~/.local/bin at the front of PATH in Fish login and interactive shells so standalone binaries are used before wrapper scripts. Fixes open-composer resolving to a failing Bun wrapper by selecting ~/.local/bin/open-composer.
Bug Fixes
Migration