Does Linux have the capability to use "junctioned" symbolic links? I'm not sure if this is an actual term or not, so let me explain the concept.
I have a git repository containing all my configuration dot files in ~/dotfiles
. I use symbolic links into this directory in order to "activate" them. For example, by executing ln -s ~/dotfiles/bash/bash_profile ~/.bash_profile
to produce the link:
~/.bash_profile -> ~/dotfiles/bash/bash_profile
However, I find myself in a situation where I want to combine the contents of multiple files. For example, I want the ~/.bash_profile
symbolic link to point to two separate files, one for each project. E.g.:
~/.bash_profile
(1) -> ~/dotfiles/bash/bash_profile
(2) -> ~/dotfiles/proj/bash_profile
I know I can simply concatenate the two files (e.g., cat ~/dotfiles/{bash,proj}/bash_profile > ~/.bash_profile
), but if I can do the same thing with symbolic links, I would prefer to.
I imagine that if such a feature exists (Nix is pretty huge), then under the hood it would have to map the two different files together, hiding all sorts of complexities under the hood (mapping file offsets of all non-first "mapped" files, locking all files when writing to the junctioned symbolic link, etc, etc).
If such a feature doesn't exist, are there are plans to implement it?
mount on directory zzzz an unziper of zzzz.zip
.bashrc
would remain generic and the project specifics would live elsewhere. You could even include different directories in the PATH depending on which project was active at that moment in time. You could also have both projects active simultaneously in different terminal windows