You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use 'command' prefix to bypass user aliases in core functions
Addresses review feedback from @akinomyoga on PR Bash-it#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 Bash-it#2342
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
0 commit comments