I am organizing all of my dotfiles into a git super-project and putting any similar files into submodules so I can pull them out individually if I need to. The issue I have run into is that I would like to have a common aliases file (and perhaps others) for both bash and zsh. Ideally I would like to have these common files be included if I choose to clone just one of bash/zsh on a system.
Right now I have the submodules ~/.bash
and ~/.zsh
. What would be nice is a ~/.shell
submodule that is actually a submodule of both ~/.bash
and ~/.zsh
. Can something like this be done? If so, how?
I am trying to avoid doing something like ~/.bash/shell
and ~/.zsh/shell
and I don't want to have to remember to update one everytime I change the other. One possible solution might be to hard link ~/.bash/shell
and ~/.zsh/shell
, but then if I clone my full dotfile repository onto a new machine, I will need to set up this hard link again.
Hopefully I have explained by question well enough. Any suggestions?
EDIT: I just found some similar stack exchange questions (here and here). It sounds like hard linking or creating a special bash-only and zsh-only super project might be the only real options. I don't really like the multiple super project option as I feel it is too much to keep updated. Is there another option that I'm still missing?