File or Directory Symlink

Ahmad Ismail <[email protected]> Tue, 7 Jun 2022 11:54:06 +0600
Newsgroups gmane.comp.gnu.stow.general
Message-ID <CAHAhJwJU+cpX9s5ETgk3aX1NpLMurYjY5_T9t7H7b2dy1X6T7w@mail.gmail.com>
I have two questions:

1.
I restore dotfiles using

find /home/ismail/.dotfiles/.common-dotfiles -type f | sed
's/\/.dotfiles\/.common-dotfiles//' | xargs -I{} rm {}
stow --target="$HOME" --dir="$HOME/.dotfiles" --delete .common-dotfiles
stow --no-folding --target="$HOME" --dir="$HOME/.dotfiles" --stow
.common-dotfiles

Is there any downside to this?

2. Sometimes I need to create symlink of files and sometimes I need to
make symlink of directories.

I need to create symlink of ".config/VSCodium/User/snippets"
directory, not files within it. So that any new snippets created by
the VSCodium UI goes to ".dotfiles/.common-dotfiles"

I need to track ".config/alacritty/alacritty.yml" file and not
".config/alacritty" directory, because I do not care about other files
in this directory.

If I use "--no-folding" then it create symlink of only files.

If I do not use "--no-folding" then it sometimes create files symlink,
sometimes create directory symlink.

Is there any way I can tell when to create file symlink and when to
create directory symlink.

Thanks and Best Regards,
Ahmad Ismail