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/liquidprompt: lint and use $THEME_CLOCK_FORMAT #2048

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gaelicWizard
Copy link
Contributor

@gaelicWizard gaelicWizard commented Jan 16, 2022

Description

  • Use $THEME_CLOCK_FORMAT instead of hard-coding it, and lint the whole file, and move the checked-out repository under the vendor tree.
  • Don't clobber $PROMPT_COMMAND or the DEBUG trap; those are owned by bash-preexec

Motivation and Context

Just cleaning up.

How Has This Been Tested?

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 marked this pull request as ready for review January 16, 2022 22:51
@gaelicWizard gaelicWizard marked this pull request as draft January 18, 2022 22:51
@gaelicWizard gaelicWizard changed the title theme/liquidprompt: use $THEME_CLOCK_FORMAT theme/liquidprompt: lint and use $THEME_CLOCK_FORMAT Jan 18, 2022
@gaelicWizard gaelicWizard force-pushed the theme/liquidprompt branch 2 times, most recently from 9af664f to b8b6d98 Compare January 18, 2022 23:01
@gaelicWizard gaelicWizard force-pushed the theme/liquidprompt branch 3 times, most recently from 215bfed to 499a145 Compare January 29, 2022 00:50
@gaelicWizard gaelicWizard force-pushed the theme/liquidprompt branch 2 times, most recently from 152b1a8 to 2cd1b2a Compare February 7, 2022 23:24
@gaelicWizard gaelicWizard marked this pull request as ready for review February 8, 2022 21:35
@NoahGorny
Copy link
Member

Cloning the theme seems pretty wild, never actually stumbled upon this code.. wow
Maybe we should just vendor it normally? does it weight much?

@gaelicWizard
Copy link
Contributor Author

gaelicWizard commented Feb 17, 2022

It's definitely pretty wild. Previously, it checked out the repo directly into the theme folder!

The question to vendor it or not, imo, is whether we want to be on the train of updating it. I have no idea if it's an active project or not. Do we want to be distributing other projects? What about things like gitstatus or nvm.sh?

It makes way more sense to me, for example, to vendor the jBoss completions because what we're bundling is specifically one or two files, which don't change often, from a large external project. Or, like preexec, where we directly depend on it so we need it inside our repo.

EDIT: liquidprompt is licensed as AGPL, so we can't vendor it.

@gaelicWizard gaelicWizard force-pushed the theme/liquidprompt branch 3 times, most recently from 463686f to ff296ae Compare February 17, 2022 18:40
gaelicWizard and others added 2 commits February 23, 2022 15:19
Alsö:
- `shfmt`
- `shellcheck`
- stop with the `cd`
Alsö, install default configuration file
@NoahGorny
Copy link
Member

It's definitely pretty wild. Previously, it checked out the repo directly into the theme folder!

The question to vendor it or not, imo, is whether we want to be on the train of updating it. I have no idea if it's an active project or not. Do we want to be distributing other projects? What about things like gitstatus or nvm.sh?

It makes way more sense to me, for example, to vendor the jBoss completions because what we're bundling is specifically one or two files, which don't change often, from a large external project. Or, like preexec, where we directly depend on it so we need it inside our repo.

EDIT: liquidprompt is licensed as AGPL, so we can't vendor it.

If we can not vendor it, we probably cant also clone it as part of our code...
I prefer to notify users that it is not installed and abort theme instead

@gaelicWizard
Copy link
Contributor Author

I think we can clone it at user request so long as we don't bundle it, but I'm alsö ok with just telling the user how to install it and make it not our responsibility.

@NoahGorny
Copy link
Member

I prefer to just instruct the user to do it, no need to do it ourselves

@gaelicWizard gaelicWizard marked this pull request as draft March 4, 2022 21:00
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