boring tech take: it's a mistake that file names and directory names can be ambiguous
Conversation
Replying to
really though if i have a path that should be a directory i always suffix it `/`. i don't have to guess when joining paths, and it finds weird concatenation bugs really often
2
1
44
But it's fun for tools where a trailing / is significant. Like at least rsync...
1
1
rsync greatly appreciates the effort to be unambigious and will reward you by cleaning up all the mess in your home directory because you did `rsync -r --delete user@host:foo/ ~` instead of `rsync -r --delete user@host:foo ~`.
... and that's why, beyond backups, I compulsively use --dry-run and implement it in my shell-scripts. Backups are for when something screws up anyway (like old opam install!)




