deadc0de6 / dotdrop

Save your dotfiles once, deploy them everywhere
https://dotdrop.readthedocs.io
GNU General Public License v3.0
1.79k stars 105 forks source link

[help] Skip adding to profile on import #360

Closed mikelorant closed 2 years ago

mikelorant commented 2 years ago

What I am trying to achieve Import a dotfile without adding it to any profiles. This is useful because a profile can contain all defined dotfiles.

Example:

profiles:
  all:
    dotfiles:
    - ALL

What I have tried so far Importing with --profile=ALL.

Is it possible to have the import command have a --skip-profile option?

deadc0de6 commented 2 years ago

Currently there's no such option to import a dotfile without a profile. You can however easily import it and edit the config file to remove it from the profile.

I'll look into adding an option to skip profile (either with a dedicated option like --skip-profile or with a keyword to the --profile cli switch, like ALL).

mikelorant commented 2 years ago

Thanks for the clarification. I went through the source code to verify this but thought it might be worth asking if there might be a workaround.

If you do add this, please make it an option in the config block so it could be enabled by default.

deadc0de6 commented 2 years ago

@mikelorant you can now import dotfiles with the profile set to ALL and those won't be added to any profile. I have added a note in the doc.

You can also set the profile through environment variables with DOTDROP_PROFILE.

This feature will be included in the next release but is already available in the master branch.