This commit addresses several code quality issues identified in the
recent bash 3.2 compatibility fixes:
1. Remove redundant array length check in is_whitelisted()
- The second check for array length > 0 is unnecessary after
already checking for length == 0
2. Clean up commented dangerous cleanup code in dev.sh
- Replace commented-out code with clear documentation
- Add explicit notes explaining why certain paths are excluded
- Improves maintainability by preventing confusion
3. Enhance test coverage for excluded paths
- Add tests to verify Mix archives are NOT cleaned
- Add tests to verify Stack programs are NOT cleaned
- Add tests to verify VS Code workspace storage is NOT cleaned
- These tests ensure critical data remains protected
All changes pass ShellCheck, syntax validation, and formatting checks.
- Add pagination for project list based on terminal height
- Show position indicator [5/25] when scrolling
- Fix GB display for values < 1 (0.6GB instead of .6GB)
- Improve project name detection by walking up to find project root
- Change default editor from nano to vim
- Add lib/manage/purge_paths.sh for interactive path management
- Shows current paths status and opens editor for customization
- Update bin/purge.sh to handle --paths option
- Update README with new command
- Remove duplicate comment in project.sh
- Fix color code issue in purge.sh help message
- Add proper spacing after load_purge_config function
- Add shell syntax highlighting in README code block
- Add Xcode Archives to whitelist options (fixes#195)
- add ensure_user_dir/ensure_user_file helpers in lib/core/base.sh, including
sudo-aware ownership correction under the invoking user’s home
- use the helpers across clean/optimize/purge/uninstall/whitelist to create
cache and export files safely (no naked mkdir/touch), including log files and
dry-run exports
- ensure purge stats/count files and update message caches are pre-created with
safe permissions
- add Darwin version helpers and skip LaunchServices/dyld rebuild on macOS 15+,
keeping the existing corruption protection for earlier versions
- guard brew cache timestamp writes and TCC permission flags with safe file
creation to avoid root-owned artifacts