fresh icon indicating copy to clipboard operation
fresh copied to clipboard

Allow files to be added to fresh controlled directories

Open twe4ked opened this issue 12 years ago • 4 comments

The following should work:

fresh vim/colors --file=~/.vim/colors/
fresh JacksonGariety/Toy-Chest-Theme toychest.vim --file=~/.vim/colors/toychest.vim

twe4ked avatar Jun 04 '13 01:06 twe4ked

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.

andyleejordan avatar Oct 15 '13 00:10 andyleejordan

@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.

jasoncodes avatar Oct 16 '13 10:10 jasoncodes

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.

mikelococo avatar Dec 21 '14 14:12 mikelococo

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

mikelococo avatar Dec 21 '14 15:12 mikelococo