1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 18:34:48 +00:00
This commit is contained in:
user
2025-05-19 22:11:07 +02:00
parent a6f1bb4417
commit 20f00ee3a0

View File

@@ -10,7 +10,7 @@ Entry | Description
`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 or the special keyword `preserve` (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))
`handle_dir_as_block` | When true, directories are handled as a single block during update operations instead of processing each file individually (defaults to false)
`dir_as_block` | List of patterns (globs/regex) to match directories that should be handled as a single block during install operations (see [ignore patterns](config-file.md#ignore-patterns)).
`ignore_missing_in_dotdrop` | Ignore missing files in dotdrop when comparing and importing (see [Ignore missing](config-file.md#ignore-missing))
`ignoreempty` | If true, an empty template will not be deployed (defaults to the value of `ignoreempty`)
`instignore` | List of patterns to ignore when installing (enclose in quotes when using wildcards; see [ignore patterns](config-file.md#ignore-patterns))
@@ -224,18 +224,20 @@ Make sure to quote the link value in the config file.
When managing dotfiles that are directories, dotdrop normally processes each file and subdirectory individually. This allows for precise control over the contents, showing individual file differences, and selectively updating files.
However, in some cases, you may prefer to treat an entire directory as a single unit.
For these scenarios, you can use the `handle_dir_as_block` option on specific dotfiles:
For these scenarios, you can use the `dir_as_block` option on specific dotfiles:
```yaml
dotfiles:
d_config:
src: app
dst: ~/.config/app
handle_dir_as_block: true
dir_as_block:
- "*app"
- "*otherdir*"
```
When this option is enabled:
- During **install** operations, the entire directory will be replaced as a whole, rather than updating individual files
- During **install** operations, any directory matching a pattern in `dir_as_block` will be replaced as a whole, rather than updating individual files
- This option has **no effect** on **compare** operations, which will always show file-by-file differences
This option defaults to `false` and can be set on any dotfile that represents a directory. It has no effect on dotfiles that are regular files.
This option defaults to an empty list and can be set on any dotfile that represents a directory. It has no effect on dotfiles that are regular files.