Skip to content
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

theme/gitline: harmonize powerline.base file(s) #2050

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

gaelicWizard
Copy link
Contributor

Description

Change theme/gitline/powerline.base and theme/powerline/powerline.base to match more closely. Alsö, lint theme/gitline.

Motivation and Context

Of all the powerline-based themes, theme/gitline had a whole copy of powerline.base.bash. By updating them to match more closely, we may be able to eliminate the duplicate file in the future.

How Has This Been Tested?

Since I haven't used the powerline* themes much, this is hard for me to test as I'm not used to what "normal" looks like.

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 gaelicWizard force-pushed the theme/powerline.base branch 2 times, most recently from 72992bc to b7e8434 Compare January 17, 2022 22:30
@gaelicWizard gaelicWizard changed the title Theme/powerline.base theme/gitline: harmonize powerline.base file(s) Jan 17, 2022
@gaelicWizard gaelicWizard force-pushed the theme/powerline.base branch 4 times, most recently from 824a4f4 to 6e37d22 Compare January 24, 2022 20:00
@gaelicWizard gaelicWizard force-pushed the theme/powerline.base branch 3 times, most recently from 3641796 to fe5528f Compare January 25, 2022 22:32
@gaelicWizard gaelicWizard marked this pull request as ready for review January 25, 2022 22:41
@NoahGorny
Copy link
Member

why wouldnt we remove the duplication here altogether? how different is gitline from the regular powerline?

@gaelicWizard
Copy link
Contributor Author

It adds hardcoded foreground colors to nearly every prompt segment. By harmonizing the files, I can see the ~15 or so differences that are different very easily. But, I don't have enough experience with the power line themes to be confident about making substantive changes. The goal is definitely to remove the duplicate file, but only after making sure we're not losing capability or breaking anything.

Besides, this alsö adds several possible segments to gitline that were previously not available.

`theme/gitline` appears to have copied an older(?) version of `powerline/powerline.base`. I'd like to eliminate the duplicate, so this is the first step.

- Add functions from `powerline/powerline.base` to `gitline/powerline.base`. These functions are NOT hooked up yet.
- Bring `__powerline_left_segment()` and `__powerline_prompt_command()` closer together.
- handle unbound parameters
- fix `$POWERLINE_COMPACT` behavior to consistently match documentation
- local some variables
- set default `$POWERLINE_PROMPT`
Copy link
Contributor

@seefood seefood left a comment

Choose a reason for hiding this comment

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

Seems legit in general, can you please merge it with master so we can make sure it passes the tests smoothly?

@seefood seefood self-assigned this Nov 7, 2024
@seefood seefood added seems abandoned rattle the cage, and close if nobody wants to keep it going waiting-for-response labels Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
seems abandoned rattle the cage, and close if nobody wants to keep it going waiting-for-response
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants