1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-07 02:30:38 +00:00

feature for #458

This commit is contained in:
deadc0de6
2025-05-14 15:57:53 +02:00
parent 1bd00b33a7
commit 8dc1af6cd2
6 changed files with 137 additions and 20 deletions

View File

@@ -10,6 +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)
`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))
@@ -216,4 +217,25 @@ profiles:
- f_test
```
Make sure to quote the link value in the config file.
Make sure to quote the link value in the config file.
## Handle directories as blocks
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:
```yaml
dotfiles:
d_config:
src: app
dst: ~/.config/app
handle_dir_as_block: true
```
When this option is enabled:
- During **install** operations, the entire directory 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.