Skip to content

Commit

Permalink
refactoring documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
deadc0de6 committed Feb 9, 2021
1 parent 913c025 commit 0684210
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 26 deletions.
18 changes: 0 additions & 18 deletions docs/config-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -645,21 +645,3 @@ dotfiles:
trans_read: r_echo_var
trans_write: w_echo_var
```

## Ignoring missing files

The [ignore missing files setting](usage.md#ignoring-missing-files)
can be configured globally or on a specific dotfile.

To configure globally, place the following in `config.yaml`:
```yaml
config:
ignore_missing_in_dotdrop: True
```

To configure per dotfile:
```yaml
dotfiles:
f_abc:
ignore_missing_in_dotdrop: True
```
2 changes: 2 additions & 0 deletions docs/config-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Entry | Description | Default
`dotpath` | path to the directory containing the dotfiles to be managed by dotdrop (absolute path or relative to the config file location) | `dotfiles`
`filter_file` | list of paths to load templating filters from (see [Templating available filters](templating.md#template-filters)) | -
`func_file` | list of paths to load templating functions from (see [Templating available methods](templating.md#template-methods)) | -
`ignore_missing_in_dotdrop` | ignore missing files in dotdrop when comparing and importing (see [Ignore missing](usage.md#ignore-missing)) | false
`ignoreempty` | do not deploy template if empty | false
`impignore` | list of patterns to ignore when importing (enclose in quotes when using wildcards, see [ignore patterns](config.md#ignore-patterns)) | -
`import_actions` | list of paths to load actions from (absolute path or relative to the config file location, see [Import actions from file](config-details.md#entry-import_actions)) | -
Expand Down Expand Up @@ -49,6 +50,7 @@ Entry | Description
`actions` | list of action keys that need to be defined in the **actions** entry below (see [actions](config-details.md#entry-actions))
`chmod` | defines the file permissions in octal notation to apply during installation (see [permissions](config.md#permissions))
`cmpignore` | list of patterns to ignore when comparing (enclose in quotes when using wildcards, see [ignore patterns](config.md#ignore-patterns))
`ignore_missing_in_dotdrop` | ignore missing files in dotdrop when comparing and importing (see [Ignore missing](usage.md#ignore-missing))
`ignoreempty` | if true empty template will not be deployed (defaults to value of `ignoreempty`)
`instignore` | list of patterns to ignore when installing (enclose in quotes when using wildcards, see [ignore patterns](config.md#ignore-patterns))
`template` | if false disable template for this dotfile (defaults to value of `template_dotfile_default`)
Expand Down
29 changes: 21 additions & 8 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,13 @@ diff command using the config entry `diff_command`.

To ignore specific pattern, see [the ignore patterns](config.md#ignore-patterns)

To completely ignore all files not present in `dotpath` see [ignore missing](#ignore-missing).

It is also possible to install all dotfiles for a specific profile
in a temporary directory in order to manually compare them with
the local version by using `install` and the `-t` switch.

For more options, see the usage with `dotdrop --help`.
See also [ignoring missing files](#ignoring-missing-files).

## List profiles

Expand Down Expand Up @@ -173,8 +174,9 @@ $ dotdrop update --key f_vimrc

If not argument is provided, all dotfiles for the selected profile are updated.

To ignore specific pattern,
see [the dedicated page](config.md#ignore-patterns)
To ignore specific pattern, see [the dedicated page](config.md#ignore-patterns)

To completely ignore all files not present in `dotpath` see [ignore missing](#ignore-missing).

There are two cases when updating a dotfile:

Expand Down Expand Up @@ -219,8 +221,6 @@ Installed to tmp /tmp/dotdrop-6ajz7565
$ diff ~/.vimrc /tmp/dotdrop-6ajz7565/home/user/.vimrc
```

See also [ignoring missing files](#ignoring-missing-files).

## Remove dotfiles

The command `remove` allows to stop managing a specific dotfile with
Expand Down Expand Up @@ -291,7 +291,7 @@ export DOTDROP_WORKDIR="/tmp/dotdrop-workdir"
export DOTDROP_WORKERS="10"
```

## Ignoring missing files
## Ignore missing

Sometimes, it is nice to have [`update`](#update-dotfiles) not copy all the files in the installed directory
or [`compare`](#compare-dotfiles) diff them.
Expand All @@ -303,6 +303,19 @@ such as a cache.
Maybe you only want to change one file and don't want the others cluttering your repository.
Maybe the program changes these files quite often and creates unnecessary diffs in your dotfiles.

In these cases, you can use the `ingore-missing` option.
In these cases, you can use the [ingore-missing](config-format.md) option.
This option is available as a flag (`--ignore-missing` or `-z`) to the `update` and `compare` commands,
or [as a configuration option either globally or on a specific dotfile](config-details.md#ignoring-missing-files).
or [as a configuration option either globally or on a specific dotfile](config-format.md).

To configure globally, place the following in `config.yaml`:
```yaml
config:
ignore_missing_in_dotdrop: true
```

To configure per dotfile:
```yaml
dotfiles:
f_abc:
ignore_missing_in_dotdrop: true
```

0 comments on commit 0684210

Please sign in to comment.