From 138fdbc8d7f42bd54e0a1d0c07d5858b1055ea50 Mon Sep 17 00:00:00 2001 From: Robin Schneider Date: Mon, 21 May 2018 19:10:17 +0200 Subject: Add 'canonicalize-path' option to link Dotbot had a hardcoded behaviour that the BASEDIR was always passed to os.path.realpath which "returns the canonical path of the specified filename, eliminating any symbolic links encountered in the path". This might not always be desirable so this commit makes it configurable. The use case where `canonicalize-path` comes in handy is the following: You want to provide dotfiles in the Filesystem Hierarchy Standard under `/usr/local/share/ypid_dotfiles/`. Now you want to provide `.config/dotfiles` as a default in `/etc/skel`. When you now pre-configure `/etc/skel` by running dotbot in it set has HOME, dotfiles will refer to `/usr/local/share/ypid_dotfiles/` and not `/etc/skel/.config/dotfiles` which does not look nice. This is related to but not the same as the `relative` parameter used with link commands. --- README.md | 1 + 1 file changed, 1 insertion(+) (limited to 'README.md') diff --git a/README.md b/README.md index ca7242d..6f6db79 100644 --- a/README.md +++ b/README.md @@ -176,6 +176,7 @@ Available extended configuration parameters: | `relink` | Removes the old target if it's a symlink (default:false) | | `force` | Force removes the old target, file or folder, and forces a new link (default:false) | | `relative` | Use a relative path to the source when creating the symlink (default:false, absolute links) | +| `canonicalize-path` | Resolve any symbolic links encountered in the source to symlink to the canonical path (default:true, real paths) | | `glob` | Treat a `*` character as a wildcard, and perform link operations on all of those matches (default:false) | | `if` | Execute this in your `$SHELL` and only link if it is successful. | | `ignore-missing` | Do not fail if the source is missing and create the link anyway (default:false) | -- cgit v1.2.3