mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-04 19:44:45 +00:00
update doc and tests for link
This commit is contained in:
@@ -28,14 +28,14 @@ Entry | Description | Default
|
||||
`keepdot` | Preserve leading dot when importing hidden file in the `dotpath` | false
|
||||
`key_prefix` | Prefix dotfile key on `import` with `f<key_separator>` for file and `d<key_separator>` for directory | true
|
||||
`key_separator` | Separator to use on dotfile key generation on `import` | `_`
|
||||
`link_dotfile_default` | Set a dotfile's `link` attribute to this value when undefined. Possible values: *nolink*, *link* (See [Symlinking dotfiles](config-file.md#symlinking-dotfiles)) | `nolink`
|
||||
`link_on_import` | Set a dotfile's `link` attribute to this value when importing. Possible values: *nolink*, *link* [Symlinking dotfiles](config-file.md#symlinking-dotfiles)) | `nolink`
|
||||
`link_dotfile_default` | Set a dotfile's `link` attribute to this value when undefined. Possible values: *nolink*, *absolute*, *relative* (See [Symlinking dotfiles](config-file.md#symlinking-dotfiles)) | `nolink`
|
||||
`link_on_import` | Set a dotfile's `link` attribute to this value when importing. Possible values: *nolink*, *absolute*, *relative* [Symlinking dotfiles](config-file.md#symlinking-dotfiles)) | `nolink`
|
||||
`longkey` | Use long keys for dotfiles when importing (See [Import dotfiles](usage.md#import-dotfiles)) | false
|
||||
`minversion` | (*for internal use, do not modify*) Provides the minimal dotdrop version to use | -
|
||||
`showdiff` | On install, show a diff before asking to overwrite (See `--showdiff`) | false
|
||||
`template_dotfile_default` | Disable templating on all dotfiles when set to false | true
|
||||
`upignore` | List of patterns to ignore when updating, appled to all dotfiles (enclose in quotes when using wildcards; see [ignore patterns](config-file.md#ignore-patterns)) | -
|
||||
`workdir` | Path to the directory where templates are installed before being symlinked when using `link:link` or `link:link_children` (absolute path or relative to the config file location) | `~/.config/dotdrop`
|
||||
`workdir` | Path to the directory where templates are installed before being symlinked when using `link:absolute|relative|link_children` (absolute path or relative to the config file location) | `~/.config/dotdrop`
|
||||
<s>link_by_default</s> | When importing a dotfile, set `link` to this value by default | false
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Entry | Description
|
||||
-------- | -------------
|
||||
`dst` | Where this dotfile needs to be deployed (dotfiles with empty `dst` are ignored and considered installed, can use `variables`, make sure to quote)
|
||||
`src` | Dotfile path within the `dotpath` (dotfiles with empty `src` are ignored and considered installed, can use `variables`, make sure to quote)
|
||||
`link` | Defines how this dotfile is installed. Possible values: *nolink*, *link*, *link_children* (See [Symlinking dotfiles](config-file.md#symlinking-dotfiles)) (defaults to value of `link_dotfile_default`)
|
||||
`link` | Defines how this dotfile is installed. Possible values: *nolink*, *absolute*, *relative*, *link_children* (See [Symlinking dotfiles](config-file.md#symlinking-dotfiles)) (defaults to value of `link_dotfile_default`)
|
||||
`actions` | List of action keys that need to be defined in the **actions** entry below (See [actions](config-actions.md))
|
||||
`chmod` | Defines the file permissions in octal notation to apply during installation (See [permissions](config-file.md#permissions))
|
||||
`cmpignore` | List of patterns to ignore when comparing (enclose in quotes when using wildcards; see [ignore patterns](config-file.md#ignore-patterns))
|
||||
@@ -25,7 +25,7 @@ Entry | Description
|
||||
dst: <where-this-file-is-deployed>
|
||||
src: <filename-within-the-dotpath>
|
||||
## Optional
|
||||
link: (nolink|link|link_children)
|
||||
link: (nolink|absolute|relative|link_children)
|
||||
ignoreempty: (true|false)
|
||||
cmpignore:
|
||||
- "<ignore-pattern>"
|
||||
@@ -209,7 +209,7 @@ profiles:
|
||||
dotfiles:
|
||||
- f_test
|
||||
variables:
|
||||
link_value: "link"
|
||||
link_value: "absolute"
|
||||
windows:
|
||||
dotfiles:
|
||||
- f_test
|
||||
|
||||
@@ -119,7 +119,8 @@ Dotdrop is able to install dotfiles in three different ways,
|
||||
which are controlled by the `link` config attribute of each dotfile:
|
||||
|
||||
* `link: nolink`: The dotfile (file or directory) is copied to its destination
|
||||
* `link: link`: The dotfile (file or directory) is symlinked to its destination
|
||||
* `link: absolute`: The dotfile (file or directory) is linked to its destination using an absolute symlink
|
||||
* `link: relative`: The dotfile (file or directory) is linked to its destination using a relative symlink
|
||||
* `link: link_children`: The files/directories found under the dotfile (directory) are symlinked to their destination
|
||||
|
||||
For more, see [this how-to](howto/symlink-dotfiles.md).
|
||||
|
||||
@@ -30,7 +30,7 @@ There are two types of transformations available:
|
||||
A typical use-case for transformations is when dotfiles need to be
|
||||
stored encrypted or compressed. For more, see [the howto](howto/howto.md).
|
||||
|
||||
Note that transformations cannot be used if the dotfile is to be linked (when `link: link` or `link: link_children`).
|
||||
Note that transformations cannot be used if the dotfile is to be linked (when `link: absolute|relative|link_children`).
|
||||
|
||||
Transformations also support additional positional arguments that must start from 2 (since `{0}` and `{1}` are added automatically). The transformations themselves as well as their arguments can also be templated.
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Dotdrop offers two ways to symlink a dotfile through its
|
||||
config entry `link`:
|
||||
|
||||
* Setting `link: link` for a dotfile will symlink `dst` to `src`
|
||||
* Setting `link: absolute` or `link: relative` for a dotfile will symlink `dst` to `src`
|
||||
* Setting `link: link_children` will, for every direct child of `src`, symlink `dst/<childrenX>` to `src/<childrenX>` (See [Link children](#link-children))
|
||||
|
||||
where `src` is the file stored in your *dotpath* and
|
||||
@@ -28,13 +28,13 @@ $ dotdrop import ~/.bashrc
|
||||
-> "/home/user/.bashrc" imported
|
||||
```
|
||||
|
||||
Edit the `config.yaml` and set the `link` value to `link`:
|
||||
Edit the `config.yaml` and set the `link` value to `absolute`:
|
||||
```yaml
|
||||
dotfiles:
|
||||
f_bashrc:
|
||||
src: bashrc
|
||||
dst: ~/.bashrc
|
||||
link: link
|
||||
link: absolute
|
||||
```
|
||||
|
||||
Install the dotfile, which will remove your `~/.bashrc` and replace it with a link to the file stored in dotdrop:
|
||||
@@ -64,7 +64,7 @@ Setting this option on a file that is not a directory will make any operation on
|
||||
|
||||
A good example of its use is when managing `~/.vim` with dotdrop.
|
||||
|
||||
Here's what it looks like when using `link: link`:
|
||||
Here's what it looks like when using `link: absolute`:
|
||||
```yaml
|
||||
config:
|
||||
dotpath: dotfiles
|
||||
@@ -72,7 +72,7 @@ dotfiles:
|
||||
vim:
|
||||
dst: ~/.vim
|
||||
src: vim
|
||||
link: link
|
||||
link: absolute
|
||||
```
|
||||
|
||||
The top directory `~/.vim` is symlinked to the `<dotpath>/vim` location:
|
||||
@@ -126,7 +126,7 @@ to dotdrop's `dotpath` directory (see [the config file doc](../config-file.md)).
|
||||
When using templating directives, however, the dotfiles are first installed into
|
||||
`workdir` (defaults to *~/.config/dotdrop*; see [the doc](../config-config.md))
|
||||
and then symlinked there.
|
||||
This applies to both dotfiles with `link: link` and `link: link_children`.
|
||||
This applies to both dotfiles with `link: absolute|relative` and `link: link_children`.
|
||||
|
||||
For example:
|
||||
```bash
|
||||
|
||||
@@ -14,7 +14,7 @@ Obviously, if the dotfile uses template directives, it needs to be templated. Ho
|
||||
is not, disabling templating will speed up its installation (since it won't have to be
|
||||
processed by the engine).
|
||||
|
||||
For dotfiles being symlinked (`link` or `link_children`), see
|
||||
For dotfiles being symlinked (`absolute`, `relative` or `link_children`), see
|
||||
[the dedicated doc](howto/symlink-dotfiles.md#templating-symlinked-dotfiles).
|
||||
|
||||
## Delimiters
|
||||
|
||||
Reference in New Issue
Block a user