Forcing a directory to be split open
- Dominant language
- Perl
- Stars
- 1.1k
- Forks
- 56
- PR merge metrics
- No merged PRs in 30d
Description
(Initially posted on the help-stow mailing list.)
Like many others, I use stow to manage my dotfiles across multiple machines. In particular, a small exerpt of my stow tree includes
~/dotfiles/vim/plugin
~/dotfiles/vim/syntax
...
so I can just cd ~/dotfiles && stow -S vim after git-cloning dotfiles to a new machine.
But that'll just do a symlink ~/.vim -> ~/dotfiles/.vim, which is not what I want: this will cause e.g. ~/.vim/undo to end up in ~/dotfiles as well. So I *always* want to split open ~/.vim. In this specific case I could alternatively get away with gitignoring all other directories in ~/.vim, but this is less optimal for dotfiles which reside e.g. in ~/.config, as I really don't want ~/.config to be a symlink but rather ~/.config/foo to be one.
So I need to first create ~/.vim myself and manually add a directory into it (e.g. ~/.vim/undo) before stowing my dotfiles, to force splitting that directory. It would be nice it it was possible to create e.g. ~/dotfiles/vim/.stow-force-split (name is up to bikeshedding) to say, "you are not allowed to symlink this directory directly, but must split it" (and that file shouldn't get symlinked itself).
Looking forward to your thoughts.
Contributor guide
Research direction
Start by reproducing the described `stow -S vim` behavior with a package containing `plugin` and `syntax` directories, then inspect the implementation and tests for directory symlinking and splitting. Done means a package marker can force the target directory to be split without itself being symlinked, with behavior covered by tests; the marker's name and exact semantics remain to be decided.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100