feat: add Oh My Zsh setup option and fix bash/zsh shell compatibility#418
feat: add Oh My Zsh setup option and fix bash/zsh shell compatibility#418marcusquinn merged 2 commits intomainfrom
Conversation
On a fresh Mac install, the default terminal uses bash but the system default shell is zsh. This caused issues where PATH changes, aliases, and tool configurations were only written to one shell's rc file. Changes: - Add setup_oh_my_zsh() early in setup flow (opt-in with y/N default) - Add shell detection helpers (detect_running_shell, detect_default_shell, get_shell_rc, get_all_shell_rcs) for consistent cross-shell support - Rewrite add_local_bin_to_path() to update all existing shell rc files - Rewrite setup_aliases() to write to both .zshrc and .bash_profile - Fix setup_worktrunk shell integration check to scan all rc files - Fix setup_terminal_title to check all rc files for existing config - Auto-fix Homebrew PATH in all shell rc files (not just current session) - Ensure Bun PATH is written to all rc files after installation - Add sed -i fallback for Linux in migrate_mcp_env_to_credentials - Add Intel Mac Homebrew path detection (/usr/local/bin)
Summary of ChangesHello @marcusquinn, 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 refines the Highlights
Changelog
Activity
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
|
|
Warning Rate limit exceeded
⌛ 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. WalkthroughSetup process enhanced with multi-shell awareness. New helper functions detect running/default shells and manage rc file updates across bash, zsh, and other shells. Interactive Oh My Zsh installation added to onboarding. Documentation updated with cross-shell PATH compatibility notes. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
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)
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 |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Sat Feb 7 03:58:01 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
There was a problem hiding this comment.
Code Review
This pull request introduces an option to set up Oh My Zsh and significantly improves shell compatibility for both bash and zsh, especially on macOS. The introduction of helper functions like get_all_shell_rcs has cleaned up the code by centralizing shell configuration logic, making functions like add_local_bin_to_path and setup_aliases more robust and readable. The changes are well-structured and enhance the setup experience. I've identified a couple of areas for improvement related to consistency in handling Homebrew paths and rc file creation. Overall, this is a great enhancement to the project.
…andling - Auto-fix Intel Mac Homebrew PATH in all shell rc files (consistent with Apple Silicon handling) - Create missing rc files before writing Bun PATH (consistent with other setup functions)
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Sat Feb 7 04:02:30 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In `@setup.sh`:
- Around line 2028-2116: The current setup_aliases flow only checks
get_all_shell_rcs() for existing alias markers and misses the fish config file,
so running on macOS with fish can append duplicate blocks to
~/.config/fish/config.fish; update setup_aliases to also check the fish rc
(variable fish_rc or path "$HOME/.config/fish/config.fish") for the marker "# AI
Assistant Server Access" (or grep the alias_block_fish) and set
any_configured=true if found, or alternatively before echoing alias_block_fish
in the fish branch run a grep -q check and skip appending when the marker
exists; use the existing symbols detect_default_shell, get_all_shell_rcs,
alias_block_fish and fish_rc to implement this guard.
- Around line 1935-1976: The add_local_bin_to_path function may fail when rc
files live in non-existent directories (e.g., fish's ~/.config/fish); before
touching or appending to each $rc_file returned by get_all_shell_rcs, ensure its
parent directory exists by running mkdir -p "$(dirname "$rc_file")" (skip or
handle files that are in the home root where dirname is "."); then proceed to
create or append to the file as before so touch/echo >> cannot fail due to
missing parent dirs.
- Around line 1167-1231: The prompt/logic mismatch: setup_oh_my_zsh currently
accepts uppercase Y because the read checks use regex ^[Yy]$, but the comments
promise lowercase y only; update the acceptance logic to only allow lowercase
'y' for both install_omz and change_shell prompts (replace the regex checks for
install_omz and change_shell) so uppercase 'Y' is ignored (or alternatively,
change the comment to state both cases are accepted) — edit the checks in
setup_oh_my_zsh where install_omz and change_shell are evaluated.
|
…(t147.7) Addressed 5 valid issues: - Remove trailing blank lines in content.md - Remove duplicate list item in aidevops-plugin.md - Remove dead setup_oh_my_opencode stub (no callers) - Add mkdir -p before touch in add_local_bin_to_path (fish dir) - Add fish config to alias duplicate detection in setup_aliases Already fixed (6 threads): augment return 0, context7 old refs, pointer file count, parse_args return, mutual exclusion guard, non-interactive check_requirements Dismissed (6 threads): Intel Homebrew path (code removed), Bun rc (code removed), lowercase-only y (intentional UX), dir check -e vs -f (unrealistic edge case), shorten warning (intentional verbosity), pr-loop dedup (maintainer dismissed)
…(t147.7) Addressed 5 valid issues: - Remove trailing blank lines in content.md - Remove duplicate list item in aidevops-plugin.md - Remove dead setup_oh_my_opencode stub (no callers) - Add mkdir -p before touch in add_local_bin_to_path (fish dir) - Add fish config to alias duplicate detection in setup_aliases Already fixed (6 threads): augment return 0, context7 old refs, pointer file count, parse_args return, mutual exclusion guard, non-interactive check_requirements Dismissed (6 threads): Intel Homebrew path (code removed), Bun rc (code removed), lowercase-only y (intentional UX), dir check -e vs -f (unrealistic edge case), shorten warning (intentional verbosity), pr-loop dedup (maintainer dismissed)
…(t147.7) (#475) Addressed 5 valid issues: - Remove trailing blank lines in content.md - Remove duplicate list item in aidevops-plugin.md - Remove dead setup_oh_my_opencode stub (no callers) - Add mkdir -p before touch in add_local_bin_to_path (fish dir) - Add fish config to alias duplicate detection in setup_aliases Already fixed (6 threads): augment return 0, context7 old refs, pointer file count, parse_args return, mutual exclusion guard, non-interactive check_requirements Dismissed (6 threads): Intel Homebrew path (code removed), Bun rc (code removed), lowercase-only y (intentional UX), dir check -e vs -f (unrealistic edge case), shorten warning (intentional verbosity), pr-loop dedup (maintainer dismissed)
* fix: triage 17 PR review threads across PRs #418,#413,#412,#399,#394 (t147.7) Addressed 5 valid issues: - Remove trailing blank lines in content.md - Remove duplicate list item in aidevops-plugin.md - Remove dead setup_oh_my_opencode stub (no callers) - Add mkdir -p before touch in add_local_bin_to_path (fish dir) - Add fish config to alias duplicate detection in setup_aliases Already fixed (6 threads): augment return 0, context7 old refs, pointer file count, parse_args return, mutual exclusion guard, non-interactive check_requirements Dismissed (6 threads): Intel Homebrew path (code removed), Bun rc (code removed), lowercase-only y (intentional UX), dir check -e vs -f (unrealistic edge case), shorten warning (intentional verbosity), pr-loop dedup (maintainer dismissed) * chore: mark t147 complete - all 50 review threads resolved across 11 PRs (GH#438)



Summary
y/Ndefault, not capital Y)Problem
On a fresh Mac, the default terminal runs bash but the system default shell is zsh (since macOS Catalina). When running
bash <(curl ...)to install aidevops, PATH changes and aliases were only written to the running shell's rc file, leaving the other shell unconfigured. This meant tools installed during setup wouldn't be available when the user opened a new terminal with their default shell.Changes
New: Oh My Zsh setup (opt-in)
setup_oh_my_zsh()offered early in setup flow, before tools that benefit from zsh plugins[y/N]prompt (lowercase y, not capital Y) since some users prefer plain zsh--unattendedflag to avoid changing shell or starting zsh during setupShell compatibility helpers
detect_running_shell()- detects bash vs zsh for the current processdetect_default_shell()- detects the user's login shell ($SHELL)get_shell_rc()- maps shell name to rc file pathget_all_shell_rcs()- returns ALL rc files that should be updated (both bash + zsh on macOS)Functions updated for cross-shell support
check_requirements()- auto-fixes Homebrew PATH in all rc files, adds Intel Mac detectionadd_local_bin_to_path()- writes to all existing shell rc filessetup_aliases()- writes to all existing shell rc filessetup_worktrunk()- checks all rc files for shell integrationsetup_terminal_title()- checks all rc files for existing configsetup_browser_tools()- ensures Bun PATH is in all rc files after installmigrate_mcp_env_to_credentials()- adds sed -i fallback for LinuxQuality
bash -nsyntax check passesSummary by CodeRabbit
Release Notes
New Features
Documentation