Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Oct 4, 2025

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 : )

seefood and others added 10 commits October 3, 2025 20:38
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>
@pull pull bot locked and limited conversation to collaborators Oct 4, 2025
@pull pull bot added the ⤵️ pull label Oct 4, 2025
@pull pull bot merged commit e98418c into devliq:master Oct 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant