anishathalye / dotbot

A tool that bootstraps your dotfiles ⚡️
MIT License
6.9k stars 287 forks source link

Hardlink support #334

Open musjj opened 1 year ago

musjj commented 1 year ago

There are some oddballs out there like Windows Terminal, which refuses to detect changes in the config file if it's a symlink (https://github.com/microsoft/terminal/issues/1812#issuecomment-508280785).

Recreating the symlink doesn't seem to do it either. The only currently viable solution is to use hardlinks, so it would be nice if dotbot can support it.

kurtmckee commented 12 months ago

To confirm, you're specifically asking for Windows NTFS hardlink support?

musjj commented 11 months ago

Yes, I wanted an NTFS hardlink (the one created with mklink /H). I no longer use Windows so I don't need this anymore, but I'll keep this issue open since there are other people who still need it judging from the thumbs ups.

kurtmckee commented 11 months ago

@anishathalye I'm assuming that this can be accomplished in the preferences, like

- link:
    ~/.config/terminator:
      path: config/terminator
      type: hardlink  # default is "symlink"

I considered but rejected designing this as a hardlink: true flag, because NTFS also supports directory junctions and it may be desirable to expand this in the future. Therefore a flag option would be less extensible.

If this looks acceptable, I'll cook up a patch to add this support and document it.