anishathalye / dotbot

A tool that bootstraps your dotfiles ⚡️
MIT License
6.91k stars 288 forks source link

feat: add the ability to load plugins in config #294

Open henworth opened 2 years ago

henworth commented 2 years ago

Adds the ability to specify plugins as a list of entries in a config file. This is an alternative to the current method of supplying them as command line flags, and is written to reflect the idea posted in #251 of allowing this syntax:

- plugins:
    - dotbot-template
    - dotbot-plugins/dotbot-apt
    - missing-plugin

Given that list, and assuming only the first two plugins have been added locally, and that template was configured as such:

- template:
    - ~/.gnupg/gpg-agent.conf:
        source_file: gpg-agent.conf
        params:
          __UNAME__:
            PINENTRY_PROGRAM:
              Darwin: /usr/local/bin/pinentry-mac
              Linux: /usr/bin/pinentry-gnome3

The output when installed would contain this:

Loading plugin from dotbot-template
Loading plugin from dotbot-plugins/dotbot-apt
Loading plugin from missing-plugin
Failed to load plugin from missing-plugin
Some commands were not successfully executed
Rendering template ~/.gnupg/gpg-agent.conf
henworth commented 2 years ago

@anishathalye Not sure if this slipped through the cracks, just wanted to see if this is something that is of interest.

anishathalye commented 2 years ago

Thanks for bumping this. It's definitely of interest, I've just been behind in reviewing this PR. I've been stretched a bit thin recently, and my first priority for open-source is fixing bugs (in particular, this from a different project that I maintain), but right after that, I plan to review and merge this PR.

henworth commented 2 years ago

No worries at all! Completely understand and respect your need to prioritize. Thank you for responding, take all the time you need.

henworth commented 1 year ago

This has been fixed up to account for interim changes.