Skip to content

BarbUk theme: Fix merge from shellcheck PR #2311

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 1 commit into from
May 21, 2025

Conversation

BarbUk
Copy link
Contributor

@BarbUk BarbUk commented May 20, 2025

Description

Last master pull has error with barbuk theme:

bash: __git-uptream-remote-logo_prompt: command not found

The last working PR for this theme was made from:
https://github.com/BarbUk/bash-it/tree/barbuk-theme/enable_SCM_THEME_CURRENT_USER, merged from #2278.

The bad merge is from #1954, with this commit:
0743ebe

This PR aim to fix the theme, will keeping shellcheck fixes from @gaelicWizard (thanks for the work)

Motivation and Context

Fix the error when using barbuk theme.

How Has This Been Tested?

Using the theme after this fix, the error is gone.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

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.

@BarbUk BarbUk changed the title Fix bad merge BarbUk theme: Fix merge from shellcheck PR May 20, 2025
@seefood seefood self-assigned this May 21, 2025
@seefood
Copy link
Contributor

seefood commented May 21, 2025

It seems like you only reversed a single commit, rather than solve the issue, it removes two functions and introduces a lot of changes. can you make it a bit more focused, please?

@BarbUk
Copy link
Contributor Author

BarbUk commented May 21, 2025

It's my theme, that I use every day.

I did not reverse a commit, I've restored the theme in working form, from the last working PR, while keeping the fixes introduced by the shellcheck merge.

The two removed functions were wrongly added by the merge.

@BarbUk
Copy link
Contributor Author

BarbUk commented May 21, 2025

A little more context, this specific commit 0743ebe from the bad merge add the two functions and change how the theme work (replacing echo in the _prompt functions by variables for example).

It seems that the merge to fix shellcheck warning was made on a branch before the theme module PR: #2121

@seefood
Copy link
Contributor

seefood commented May 21, 2025

If the only breakage is the name of the function, why not rename it back or change the call? there must have been a reason for this change, I just have no time to dig into this. If you prefer this PR then I will merge it, as it seems shellcheck is not complaining.

@BarbUk
Copy link
Contributor Author

BarbUk commented May 21, 2025

If the only breakage is the name of the function, why not rename it back or change the call

It's not just the function call.
The shellcheck merge is reverting a previous version of the theme (before the PR that made the theme more modular: #2121)

In the current master branch, the theme throws an error for the function, and some modular parts are not working anymore (python env, ssh info etc.).

I just have no time to dig into this

Yeah, and it's complicated to follow because the shellcheck merge bring back old version of the theme only in specific function.

If you want to understand the source of the issue, check 0743ebe that add two unused function:
image

Those two function where remove from the 2022 theme rework:
b839294

If you prefer this PR then I will merge it, as it seems shellcheck is not complaining.

It's not that I prefer the PR :).
It's a fix to bring back the last working version of the theme with the shellcheck fixes introduced in #1954.

I don't know how to make more easily comprehensible.
Maybe if I revert the commit 0743ebe and make new commit to fix the shellcheck warning ?

In any case, it's the theme I use right now to work, and all functionality of the theme are working as intended with this PR.

@seefood seefood merged commit 70b2b2b into Bash-it:master May 21, 2025
5 of 6 checks passed
@seefood
Copy link
Contributor

seefood commented May 21, 2025

Sorry, got it now. Middle of the work day here, my neurons are spread thin :-))

@BarbUk
Copy link
Contributor Author

BarbUk commented May 21, 2025

Middle of the work day here, my neurons are spread thin :-))

Same for me.
Explaining the issue was harder than fixing it :)

Thanks for the merge.

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.

2 participants