Open chaopeng opened 6 months ago
If I build my own program to manage the syslink, the first problem need to solve would be broken link. For example:
~/dotfiles/bash/.bashrc
=> ~/.bashrc
~/dotfiles/bash/.bashrc
, ~/.bashrc
will be a broken link~/.bashrc
should delete?~/dotfiles/bash/.bashrc
to ~/dotfiles/bsh/.bashrc
, need rebuild the linkTo resolve this we need to walk the whole file tree, need to ensure this is not too slow. Also need to ensure, we don't delete the link if it is updated, eg. bsh tasks runs earlier than bash task.
I just write this doc to dump thought in my brain, not sure when I will update how to manage my dotfiles.
Background
I am using this repo (and submodule for nvim, and private repo) to manage across many devices (> 6). Device running in different platforms:
Dotfiles provides me same (mostly) experience across device. And easy setup for new device. Currently, it is based on stow.
Pros / Cons
Pros
Cons
.config
, dir is deep, and many cli tools ignore hidden files, because stow on ~.fish
->~/.config/fish
.~/.config/fish
, link will go down onfish/*
, if~/.config/fish
not exists, the link will befish
->~/.config/fish
. which will make it different when I edit files in~/.config/fish
.Any Soultion