dotfiles icon indicating copy to clipboard operation
dotfiles copied to clipboard

Question: Symlink into a subdirectory of home - e.g. ~/.aws/config

Open bradical opened this issue 2 years ago • 4 comments

I was wondering if you had any suggestions for symlinking a config file into a subdirectory of a .dot directory in home, specifically .aws files?

Is there any capacity to do this already with the current .symlink behavior?

bradical avatar Apr 02 '24 13:04 bradical

Speaking personally, I add a link.sh to each folder that has more complicated linking needs. And then I have a script/link script to run all of them: https://github.com/redhotvengeance/dotfiles/blob/fe8be45f7c38a098f104a8cf0c6f6a61c9901d0a/script/link#L25

redhotvengeance avatar Apr 03 '24 00:04 redhotvengeance

Clever. Thanks! So this could create the ~/.aws directory if didn't exist and add a config file.

bradical avatar Apr 03 '24 14:04 bradical

@bradical Yep. Check out one of my link.sh files that does several actions: https://github.com/redhotvengeance/dotfiles/blob/main/nvim/link.sh

redhotvengeance avatar Apr 05 '24 01:04 redhotvengeance

Hey, This is pretty nice. I also wanted to make links in directories and I took a different approach. My idea is to use a different extension '.dsymlink' and update bootstrap so that it links those files into a sub-directory of home. https://github.com/schangj09/dotfiles/commit/db41cc80952ce065547634f53ac16d35e4b1cb7a

Note: I didn't test it much, so for example, I'm not sure what happens when the directory doesn't exist, but it should be easy to fix if needed.

schangj09 avatar Apr 08 '24 13:04 schangj09