Skip to content

Conversation

seefood
Copy link
Contributor

@seefood seefood commented May 5, 2025

Clean Up All The Plugins

code by @gaelicWizard , manually rebased on latest master by @seefood

Description

This is my work-in-progress branch with all the plugins cleanup.

Motivation and Context

This branch is based on my shellcheck (#1917) and command_duration (#1906) branches, so the changes here are entirely within the plugins section.

How Has This Been Tested?

My main branch is based on this branch.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code follows the code style of this project.
  • If my change requires a change to the documentation, I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • If I have added a new file, I also added it to clean_files.txt and formatted it using lint_clean_files.sh.
  • I have added tests to cover my changes, and all the new and existing tests pass.

gaelicWizard and others added 18 commits May 5, 2025 14:52
The logic to guess whether to use `.bash_profile` or `.bashrc` was buggy and wrong. Just use `.bashrc` and either automatically fill in a `.bash_profile`, or notify the user that they need to edit their `.bash_profile`.
docs/installation: add to note about interactive/login shells
- Alsö, add implementation note at top.
uninstall: TIL that `fgrep` is deprecated...
- and generally comment out useless varbls
This adds *two* lines to `bash_it.sh`. Just not worth an extra file requiring special handling.
...and update all the tests...
- it doesn't make sense; I'm guessing it was due to a misunderstanding of host names?
- Don't define some aliases if the target isn't installed, use _command_exists to check instead of `type` and `which`.
- Use `$EDITOR` for the editor for aliases about editing, excep the `sudo` ones because maybe you want those specifically?
- Fix `ls` aliases to match their common definitions (-A instead of -a: don't show '.' and '..' when displaying hidden files).
This plugin *only* provides utility functions, so it has zero cost to just being enabled. This allows us to eliminate assumptions from `lib/theme` and several themes.
@seefood
Copy link
Contributor Author

seefood commented May 5, 2025

see discussions on #1950

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ShellCheck found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@seefood seefood marked this pull request as draft May 5, 2025 12:41
@seefood seefood mentioned this pull request May 5, 2025
6 tasks
Ira Abramov and others added 2 commits July 13, 2025 14:40
* master:
  remove superfluous function and pick better var names for readability
  Update base.theme.bash
  Update base.theme.bash
  Update base.theme.bash
  Update base.theme.bash
  Fix for 2323 issue
  Apply fixes
  Add `.git-blame-ignore-revs`
  Clean themes A-L
  Update powerline-multiline.base.bash
  Fix a couple bugs introduced by last commit
  Fix bad merge
  important syntax correction from the owenr of ble.sh
  only the correct FZF integration loads, sepending on whether the blesh plugin is enabled as well.
  readonly HIST* variables is a bit extreme and clashes with ble.sh and other tools.
  Fix node and ruby colors
  Update themes/base.theme.bash
  lib/theme: use `_command_exists()`
  `node_version_prompt` should work without NVM
@seefood seefood marked this pull request as ready for review July 13, 2025 11:42
Ira Abramov added 2 commits July 13, 2025 14:43
…ic-plugins

* 'gaelic-plugins' of github.com:seefood/bash-it:
  Update plugins/available/extract.plugin.bash
  plugin/extract: `shellcheck`
  plugin/extract: `shfmt`
  aliases/general: move `xt` to `plugin/extract`
  aliases/editor: split out editor shortcuts
  aliases/directory: split out directory shortcuts
  aliases/general: cleanup
@seefood seefood marked this pull request as draft July 23, 2025 09:43
@seefood seefood self-assigned this Jul 23, 2025
seefood and others added 2 commits September 24, 2025 20:04
* master:
  Add aliases for git worktree
  Tofu completion rewrite
  have pre-commit ignore the /vendor, they should be immutable.
  Fix: __powerline_last_status_prompt to handle unset argument safely
  completion/dirs
  completion/export
  completion/vuejs: `shellcheck`
  completion/notify-send: `shellcheck`
  completion/dmidecode: `shellcheck`
  completions: clear and consistent log messages
  completions: `shellcheck`
  completions: add to `clean_files.txt`
  lib/completion: `_bash-it-completion-helper-necessary()` et al
  lib/completion
- Fix SVN priority test expectation (750 instead of 150)
- Add fallback handling for xterm plugin when safe_append functions unavailable
- Add guards for battery functions in base theme
- Add CLAUDE.md project documentation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
seefood and others added 3 commits September 25, 2025 21:35
Resolve conflicts by:
- Keep 750 alias priority (correct default)
- Adopt safer ${var:-} variable expansion from upstream
- Keep color constants instead of hardcoded escape sequences
- Add 'run' commands to tests for better practices

Conflicts resolved in:
- install.sh: Variable expansion and color handling
- test/lib/helpers.bats: Priority values and test commands
The template now uses "${BASH_IT?}/bash_it.sh" instead of "$BASH_IT"/bash_it.sh
but the test was checking for the old format, causing CI failures.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@seefood seefood marked this pull request as ready for review September 27, 2025 15:55
@seefood seefood force-pushed the gaelic-plugins branch 3 times, most recently from bdefb80 to 2665ca8 Compare September 27, 2025 19:49
@seefood
Copy link
Contributor Author

seefood commented Sep 28, 2025

@akinomyoga what do you think? it seems to be doing a bit more than @gaelicWizard description but I think I understand most of it as positive changes. should we merge or split it to topics to be sure?

also, I see the tests keep getting stuck on ubuntu 20.04 which I believe is no longer supported on GH for free CI accounts, but ubuntu 20 is not in the matrix, so I am not sure why it is even trying. If you have any insights I would appreciate them.

Copy link
Contributor

@akinomyoga akinomyoga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@akinomyoga what do you think?

I just quickly scanned through the changes. LGTM.

should we merge or split it to topics to be sure?

I think you can do what you are comfortable with for how the review process should be done, since you are the maintainer who needs to take care of the project after all.

also, I see the tests keep getting stuck on ubuntu 20.04 which I believe is no longer supported on GH for free CI accounts, but ubuntu 20 is not in the matrix, so I am not sure why it is even trying. If you have any insights I would appreciate them.

I'm sorry, but could you explain this in a bit more detail? I think I don't correctly understand what you are talking about.

  • What do you mean by "getting stuck on ubuntu 20.04"? I checked the workflow file, but it references ubuntu-24.04 (but not 20.04), so it seems to me that the tests target Ubuntu 24.04. Or are there any places where 20.04 is required? I searched the repository for 20.04, but none seem to match.
  • What does "I am not sure why it is even trying." mean? Does GitHub try to run the tests on 24.04? I opened and checked several workflow runs, but GitHub seems to run only 24.04. Or does anything else try to run 20.04? What is it?

@seefood seefood merged commit 0c660a3 into Bash-it:master Oct 3, 2025
11 checks passed
@seefood seefood deleted the gaelic-plugins branch October 3, 2025 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants