Replies: 1 comment 1 reply
-
|
Flow does atomic file writes, which basically means it writes a new file and then moves the fully written file to the final location, thus instantly replacing the file in an atomic operation. Many editors work this way because it guarantees that you never write half a file. (Which can typically happen easily if your file system is nearly full for example) This by definition means that flow will break hard links, but flow supports writing through symlinks since 0.7 now, so you can just use a symlink instead. (which is commonly the preferred solution anyway) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've set
flowas the EDITOR in my shell config.I noticed that the dotfile management tool chezmoi by default uses hardlinks in such a way, that running
chezmoi edit <some config file>opens the config file correctly but saving the file does nothing. I.e., I hit ctrl+s in flow but no changes are saved into the edited file.The same doesn't happen if I do
EDITOR=emacs chezmoi edit. I notice that I can also make it work with flow if I dochezmoi edit --hardlink=false <some file>. The docs for the hardlink feature state:(https://www.chezmoi.io/reference/commands/edit/)
I wonder why does flow behave this way with hardlinks?
Beta Was this translation helpful? Give feedback.
All reactions