bash-it icon indicating copy to clipboard operation
bash-it copied to clipboard

theme/liquidprompt: lint and use `$THEME_CLOCK_FORMAT`

Open gaelicWizard opened this issue 3 years ago • 5 comments

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

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

Checklist:

  • [x] My code follows the code style of this project.
  • [x] If my change requires a change to the documentation, I have updated the documentation accordingly.
  • [x] I have read the CONTRIBUTING document.
  • [x] 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 avatar Jan 16 '22 22:01 gaelicWizard

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

NoahGorny avatar Feb 16 '22 21:02 NoahGorny

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 avatar Feb 17 '22 00:02 gaelicWizard

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

NoahGorny avatar Mar 03 '22 21:03 NoahGorny

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.

gaelicWizard avatar Mar 03 '22 22:03 gaelicWizard

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

NoahGorny avatar Mar 04 '22 19:03 NoahGorny