forked from Bash-it/bash-it
-
Notifications
You must be signed in to change notification settings - Fork 0
[pull] master from Bash-it:master #41
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Implements enhancement requested in issue #1745 to provide a concise summary of enabled components via `bash-it doctor` command. The new default behavior shows: - Environment info (OS, Bash version, config file location) - Bash-it version (commit, tag, update status) - How bash-it is loaded (with context from .bashrc/.bash_profile) - Summary of enabled aliases, plugins, and completions This makes it easier for users to: - Share diagnostic info when reporting bugs - Quickly see their current bash-it configuration - Check if their installation is up to date Usage: `bash-it doctor` or `bash-it doctor summary` The existing doctor error/warning modes still work: - `bash-it doctor errors` - `bash-it doctor warnings` - `bash-it doctor all` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Enhancements to the bash-it doctor command: **Interactive Update Prompt:** - Offers to update bash-it when behind remote master - Only prompts when safe (no uncommitted changes, can fast-forward) - Performs git merge with --ff-only for safety - Provides clear feedback on update status **Colorful Output:** - Color-coded sections (cyan headers, green labels, yellow warnings) - Visual indicators (✓ for up-to-date status) - Improved readability for terminal output **Better Configuration Detection:** - Now greps ALL common config files (.bashrc, .bash_profile, .profile) - Shows bash-it loading context from each file found - Previously only checked single config file **Improved Version Display:** - Shows commits ahead of latest tag (e.g., "v3.1.2 +3") - Clearer version information for users not on tagged releases **Documentation Updates:** - Updated bug_report.yml to streamline diagnostic info collection - Added Diagnostics section to README - Emphasizes using `bash-it doctor` for bug reports Related to issue #1745 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Adds comprehensive checking to detect if .bashrc is properly sourced from login shell profile files on macOS, Solaris, Illumos, and BSD systems. **Problem:** On macOS/BSD/Solaris, login shells source .bash_profile or .profile, NOT .bashrc. If these files don't source .bashrc, bash-it won't load in: - Terminal.app (macOS) - SSH sessions - New login shells **Solution:** New "Profile Configuration" section in `bash-it doctor` that: 1. **Grep Detection (Primary)** - Fast, safe pattern matching for common .bashrc sourcing patterns - Detects: `source ~/.bashrc`, `. $HOME/.bashrc`, BASH_VERSION checks - Handles quoted paths and various syntaxes 2. **Brute Force Test (Fallback)** - Used only when grep is unclear - Temporarily replaces .bashrc with echo marker - Tests in login shell: `bash -l` - Immediately restores original .bashrc - Handles symlinks safely (via mv) 3. **User Guidance** - Shows if profile file is a symlink (common with homesick/dotfiles) - Provides clear ✓/✗ status with color coding - Displays fix snippet for copy/paste when needed **Implementation Notes:** - Only runs on affected platforms (Darwin, SunOS, Illumos, *BSD) - Grep detection catches 99% of cases safely - Brute force is safe: atomic mv operations, immediate restore - Provides actionable fix instructions **Development Guidelines:** - Added Git workflow section to CLAUDE.md - Documents "never commit to master" policy - Ensures feature branch workflow Related to issue #1455 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
Addresses review feedback from @akinomyoga on PR #2342. **Problem:** Users may have aliases like: - `alias mv='mv -i'` (prompts for confirmation) - `alias grep='grep --color=always'` (breaks parsing) - `alias rm='rm -i'` (prompts for confirmation) These aliases can break bash-it core functions that assume standard command behavior. **Solution:** Prefix sensitive commands with `command` to bypass aliases: - `command mv` - ensures atomic file operations without prompts - `command grep` - ensures predictable output format - Applied to all mv/grep calls in doctor functions **Documentation:** Added coding standard to CLAUDE.md: - Documents the `command` prefix pattern - Lists common commands that should be prefixed - Explains why this prevents surprises in core functions This is a defensive programming practice that makes bash-it more robust against varied user configurations. Thanks to @akinomyoga for catching this! Related to PR #2342 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )