Allow files to be added to fresh controlled directories
The following should work:
fresh vim/colors --file=~/.vim/colors/
fresh JacksonGariety/Toy-Chest-Theme toychest.vim --file=~/.vim/colors/toychest.vim
Also:
fresh andschwa/emacs.d/ . --file=~/.emacs.d/
Should symlink the files from the git repository, and not erase files that Emacs generates in that folder (that also exist in the repo's .gitignore file). This currently does not work, because fresh will destroy the package archives that my init.el file downloads.
@andschwa This has been discussed previously over in issue #80. You should be able to accomplish what you’re after using fresh_after_build as mentioned in my comment there.
To keep everything in one place, please keep any further discussion about this over on the other issue. Cheers.
I hit this within about an hour of experimenting with fresh. Fresh excels at composing files together and composing files to make directories, but composing files with managed directories using hooks/callbacks feels awkward. The proposed solution of symlinking all of the individual files rather than the top-level directory seems elegant to me since it allows other fresh mechanisms to "just work" within managed directories and also preserves non-managed files within across fresh updates.
Here's a complete example of a relatively simple workaround that adds the 'personal' directory to prelude's '.emacs.d' directory. It totally opts out of the fresh tooling to do so, though, just using raw sh and git in the freshrc (taking advantage of being able to script within freshrc):
https://github.com/sanbor/dotfiles/blob/c9464f585d3508d36bf58e57742f66f5e2d8be91/freshrc#L25