1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-11 13:44:16 +00:00

doc fix links

This commit is contained in:
deadc0de6
2020-09-12 15:06:36 +02:00
parent 7be2eeff45
commit fecf2adaa9
12 changed files with 82 additions and 82 deletions

View File

@@ -1,6 +1,6 @@
# Config variables # Config variables
* [Config available variables](available-variables) * [Config available variables](#available-variables)
* [Variables entry](#variables-entry) * [Variables entry](#variables-entry)
* [Profile variables](#profile-variables) * [Profile variables](#profile-variables)
* [Config variables in templates](#config-variables-in-templates) * [Config variables in templates](#config-variables-in-templates)
@@ -8,12 +8,12 @@
--- ---
# Config available variables # Available variables
Multiple variables can be used within the config file to Multiple variables can be used within the config file to
parametrize following elements of the config: parametrize following elements of the config:
* dotfiles `src` and `dst` paths (see [Dynamic dotfile paths](config#dynamic-dotfile-paths)) * dotfiles `src` and `dst` paths (see [Dynamic dotfile paths](config.md#dynamic-dotfile-paths))
* external path specifications * external path specifications
* `import_variables` * `import_variables`
* `import_actions` * `import_actions`
@@ -22,8 +22,8 @@ parametrize following elements of the config:
`actions` and `transformations` also support the use of variables `actions` and `transformations` also support the use of variables
but those are resolved when the action/transformation is executed but those are resolved when the action/transformation is executed
(see [Dynamic actions](config#dynamic-actions), (see [Dynamic actions](config.md#dynamic-actions),
[Dynamic transformations](config#dynamic-transformations) and [Templating](templating)). [Dynamic transformations](config.md#dynamic-transformations) and [Templating](../template/templating.md)).
Following variables are available in the config files: Following variables are available in the config files:
@@ -31,9 +31,9 @@ Following variables are available in the config files:
* [interpreted variables defined in the config](#interpreted-variables-entry) * [interpreted variables defined in the config](#interpreted-variables-entry)
* [profile variables defined in the config](#profile-variables) * [profile variables defined in the config](#profile-variables)
* environment variables: `{{@@ env['MY_VAR'] @@}}` * environment variables: `{{@@ env['MY_VAR'] @@}}`
* dotdrop header: `{{@@ header() @@}}` (see [Dotdrop header](templating#dotdrop-header)) * dotdrop header: `{{@@ header() @@}}` (see [Dotdrop header](../template/templating.md#dotdrop-header))
As well as all template methods (see [Available methods](templating#available-methods)) As well as all template methods (see [Available methods](../template/templating.md#available-methods))
# Variables entry # Variables entry
@@ -89,7 +89,7 @@ profiles:
# Config variables in templates # Config variables in templates
`variables` and `dynvariables` are also made available in templates `variables` and `dynvariables` are also made available in templates
(see [Template variables](templating#template-variables)). (see [Template variables](../template/templating.md#template-variables)).
Variables in the config file Variables in the config file
```yaml ```yaml

View File

@@ -49,18 +49,18 @@ Content Format:
one that will be installed by dotdrop (default *true*) one that will be installed by dotdrop (default *true*)
* `banner`: display the banner (default *true*) * `banner`: display the banner (default *true*)
* `cmpignore`: list of patterns to ignore when comparing, apply to all dotfiles * `cmpignore`: list of patterns to ignore when comparing, apply to all dotfiles
(enclose in quotes when using wildcards, see [ignore patterns](ignore-pattern)) (enclose in quotes when using wildcards, see [ignore patterns](ignore-pattern.md))
* `create`: create directory hierarchy when installing dotfiles if * `create`: create directory hierarchy when installing dotfiles if
it doesn't exist (default *true*) it doesn't exist (default *true*)
* `default_actions`: list of action's keys to execute for all installed dotfile * `default_actions`: list of action's keys to execute for all installed dotfile
(see [Use actions](usage-actions)) (see [Use actions](usage-actions.md))
* `diff_command`: the diff command to use for diffing files (default `diff -r -u {0} {1}`) * `diff_command`: the diff command to use for diffing files (default `diff -r -u {0} {1}`)
* `dotpath`: path to the directory containing the dotfiles to be managed (default `dotfiles`) * `dotpath`: path to the directory containing the dotfiles to be managed (default `dotfiles`)
by dotdrop (absolute path or relative to the config file location) by dotdrop (absolute path or relative to the config file location)
* `filter_file`: list of paths to load templating filters from * `filter_file`: list of paths to load templating filters from
(see [Templating available filters](templating#available-filters)) (see [Templating available filters](../template/templating.md#available-filters))
* `func_file`: list of paths to load templating functions from * `func_file`: list of paths to load templating functions from
(see [Templating available methods](templating#available-methods)) (see [Templating available methods](../template/templating.md#available-methods))
* `ignoreempty`: do not deploy template if empty (default *false*) * `ignoreempty`: do not deploy template if empty (default *false*)
* `import_actions`: list of paths to load actions from * `import_actions`: list of paths to load actions from
(absolute path or relative to the config file location, (absolute path or relative to the config file location,
@@ -72,7 +72,7 @@ Content Format:
(absolute path or relative to the config file location, (absolute path or relative to the config file location,
see [Import variables from file](#import-variables-from-file)) see [Import variables from file](#import-variables-from-file))
* `instignore`: list of patterns to ignore when installing, apply to all dotfiles * `instignore`: list of patterns to ignore when installing, apply to all dotfiles
(enclose in quotes when using wildcards, see [ignore patterns](ignore-pattern)) (enclose in quotes when using wildcards, see [ignore patterns](ignore-pattern.md))
* `keepdot`: preserve leading dot when importing hidden file in the `dotpath` (default *false*) * `keepdot`: preserve leading dot when importing hidden file in the `dotpath` (default *false*)
* `link_dotfile_default`: set dotfile's `link` attribute to this value when undefined. * `link_dotfile_default`: set dotfile's `link` attribute to this value when undefined.
Possible values: *nolink*, *link*, *link_children* (default: *nolink*, Possible values: *nolink*, *link*, *link_children* (default: *nolink*,
@@ -81,11 +81,11 @@ Content Format:
Possible values: *nolink*, *link*, *link_children* (default: *nolink*, Possible values: *nolink*, *link*, *link_children* (default: *nolink*,
see [Symlinking dotfiles](#symlinking-dotfiles)) see [Symlinking dotfiles](#symlinking-dotfiles))
* `longkey`: use long keys for dotfiles when importing (default *false*, * `longkey`: use long keys for dotfiles when importing (default *false*,
see [Import dotfiles](usage#import-dotfiles)) see [Import dotfiles](../usage.md#import-dotfiles))
* `minversion`: (*for internal use, do not modify*) provides the minimal dotdrop version to use * `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`) (default *false*) * `showdiff`: on install show a diff before asking to overwrite (see `--showdiff`) (default *false*)
* `upignore`: list of patterns to ignore when updating, apply to all dotfiles * `upignore`: list of patterns to ignore when updating, apply to all dotfiles
(enclose in quotes when using wildcards, see [ignore patterns](ignore-pattern)) (enclose in quotes when using wildcards, see [ignore patterns](ignore-pattern.md))
* `workdir`: path to the directory where templates are installed before being symlinked * `workdir`: path to the directory where templates are installed before being symlinked
when using `link:link` or `link:link_children` when using `link:link` or `link:link_children`
(absolute path or relative to the config file location, defaults to *~/.config/dotdrop*) (absolute path or relative to the config file location, defaults to *~/.config/dotdrop*)
@@ -102,18 +102,18 @@ Content Format:
Possible values: *nolink*, *link*, *link_children* (default: `link_dotfile_default`, Possible values: *nolink*, *link*, *link_children* (default: `link_dotfile_default`,
see [Symlinking dotfiles](#symlinking-dotfiles)) see [Symlinking dotfiles](#symlinking-dotfiles))
* `actions`: list of action keys that need to be defined in the **actions** entry below * `actions`: list of action keys that need to be defined in the **actions** entry below
(see [Use actions](usage-actions)) (see [Use actions](usage-actions.md))
* `cmpignore`: list of patterns to ignore when comparing (enclose in quotes when using wildcards, * `cmpignore`: list of patterns to ignore when comparing (enclose in quotes when using wildcards,
see [ignore patterns](ignore-pattern)) see [ignore patterns](ignore-pattern.md))
* `ignoreempty`: if true empty template will not be deployed (defaults to the value of `ignoreempty` above) * `ignoreempty`: if true empty template will not be deployed (defaults to the value of `ignoreempty` above)
* `instignore`: list of patterns to ignore when installing (enclose in quotes when using wildcards, * `instignore`: list of patterns to ignore when installing (enclose in quotes when using wildcards,
see [ignore patterns](ignore-pattern)) see [ignore patterns](ignore-pattern.md))
* `trans_read`: transformation key to apply when installing this dotfile * `trans_read`: transformation key to apply when installing this dotfile
(must be defined in the **trans_read** entry below, see [Use transformations](usage-transformations)) (must be defined in the **trans_read** entry below, see [Use transformations](usage-transformations.md))
* `trans_write`: transformation key to apply when updating this dotfile * `trans_write`: transformation key to apply when updating this dotfile
(must be defined in the **trans_write** entry below, see [Use transformations](usage-transformations)) (must be defined in the **trans_write** entry below, see [Use transformations](usage-transformations.md))
* `upignore`: list of patterns to ignore when updating (enclose in quotes when using wildcards, * `upignore`: list of patterns to ignore when updating (enclose in quotes when using wildcards,
see [ignore patterns](ignore-pattern)) see [ignore patterns](ignore-pattern.md))
* DEPRECATED `link_children`: replaced by `link: link_children` * DEPRECATED `link_children`: replaced by `link: link_children`
* DEPRECATED `trans`: replaced by `trans_read` * DEPRECATED `trans`: replaced by `trans_read`
@@ -149,7 +149,7 @@ Content Format:
* `dynvariables`: profile specific interpreted variables * `dynvariables`: profile specific interpreted variables
(see [Interpreted variables](#interpreted-variables)) (see [Interpreted variables](#interpreted-variables))
* `actions`: list of action keys that need to be defined in the **actions** entry below * `actions`: list of action keys that need to be defined in the **actions** entry below
(see [Use actions](usage-actions)) (see [Use actions](usage-actions.md))
```yaml ```yaml
<some-profile-name-usually-the-hostname>: <some-profile-name-usually-the-hostname>:
@@ -173,21 +173,21 @@ Content Format:
- ... - ...
``` ```
* **actions** entry (optional): a list of actions (see [Use actions](usage-actions)) * **actions** entry (optional): a list of actions (see [Use actions](usage-actions.md))
```yaml ```yaml
actions: actions:
<action-key>: <command-to-execute> <action-key>: <command-to-execute>
``` ```
* **trans_read** entry (optional): a list of transformations (see [Use transformations](usage-transformations)) * **trans_read** entry (optional): a list of transformations (see [Use transformations](usage-transformations.md))
```yaml ```yaml
trans_read: trans_read:
<trans-key>: <command-to-execute> <trans-key>: <command-to-execute>
``` ```
* **trans_write** entry (optional): a list of write transformations (see [Use transformations](usage-transformations)) * **trans_write** entry (optional): a list of write transformations (see [Use transformations](usage-transformations.md))
```yaml ```yaml
trans_write: trans_write:
@@ -211,19 +211,19 @@ dynvariables:
# Actions # Actions
see [Actions](usage-actions) see [Actions](usage-actions.md)
# Transformations # Transformations
see [Transformations](usage-transformations) see [Transformations](usage-transformations.md)
# Variables # Variables
see [Variables](config-variables) see [Variables](config-variables.md)
# Interpreted variables # Interpreted variables
see [Interpreted variables](config-variables) see [Interpreted variables](config-variables.md)
# Symlinking dotfiles # Symlinking dotfiles
@@ -234,7 +234,7 @@ which are controlled by the `link` attribute of each dotfile:
* `link: link`: the dotfile (file or directory) is symlinked to its destination * `link: link`: the dotfile (file or directory) is symlinked to its destination
* `link: link_children`: the files/directories found under the dotfile (directory) are symlinked to their destination * `link: link_children`: the files/directories found under the dotfile (directory) are symlinked to their destination
For more see [this how-to](symlinked-dotfiles) For more see [this how-to](../howto/symlinked-dotfiles.md)
# All dotfiles for a profile # All dotfiles for a profile
@@ -282,7 +282,7 @@ profiles:
Here profile *host1* contains all the dotfiles defined for *host2* plus `f_xinitrc`. Here profile *host1* contains all the dotfiles defined for *host2* plus `f_xinitrc`.
For more advanced use-cases variables For more advanced use-cases variables
([variables](config-variables) and [dynvariables](config-variables)) ([variables](config-variables.md) and [dynvariables](config-variables.md))
can be used to specify the profile to include in a profile can be used to specify the profile to include in a profile
For example: For example:
@@ -498,7 +498,7 @@ import_configs:
# Dynamic dotfile paths # Dynamic dotfile paths
Dotfile source (`src`) and destination (`dst`) can be dynamically constructed using Dotfile source (`src`) and destination (`dst`) can be dynamically constructed using
defined variables ([variables and dynvariables](config-variables)). defined variables ([variables and dynvariables](config-variables.md)).
For example to have a dotfile deployed on the unique firefox profile where the For example to have a dotfile deployed on the unique firefox profile where the
profile path is dynamically found using a shell oneliner stored in a dynvariable: profile path is dynamically found using a shell oneliner stored in a dynvariable:
@@ -519,8 +519,8 @@ Make sure to quote the path in the config file.
# Dynamic actions # Dynamic actions
Variables ([config variables and dynvariables](config-variables) Variables ([config variables and dynvariables](config-variables.md)
and [template variables](templating#template-variables)) can be used and [template variables](../template/templating.md#template-variables)) can be used
in actions for more advanced use-cases. in actions for more advanced use-cases.
```yaml ```yaml
@@ -553,8 +553,8 @@ Make sure to quote the actions using variables.
# Dynamic transformations # Dynamic transformations
As for [dynamic actions](#dynamic-actions), transformations support As for [dynamic actions](#dynamic-actions), transformations support
the use of variables ([variables and dynvariables](config-variables) the use of variables ([variables and dynvariables](config-variables.md)
and [template variables](templating#template-variables)). and [template variables](../template/templating.md#template-variables)).
A very dumb example: A very dumb example:
```yaml ```yaml

View File

@@ -8,13 +8,13 @@
It is possible to ignore specific patterns when using dotdrop. For example for `compare` when temporary It is possible to ignore specific patterns when using dotdrop. For example for `compare` when temporary
files don't need to appear in the output. files don't need to appear in the output.
* for [install](usage#install-dotfiles) * for [install](../usage.md#install-dotfiles)
* using `instignore` in [the config file](config) * using `instignore` in [the config file](config.md)
* for [compare](usage#compare-dotfiles) * for [compare](../usage.md#compare-dotfiles)
* using `cmpignore` in [the config file](config) * using `cmpignore` in [the config file](config.md)
* using the command line switch `-i --ignore` * using the command line switch `-i --ignore`
* for [update](usage#update-dotfiles) * for [update](../usage.md#update-dotfiles)
* using `upignore` in [the config file](config) * using `upignore` in [the config file](config.md)
* using the command line switch `-i --ignore` * using the command line switch `-i --ignore`
The ignore pattern must follow Unix shell-style wildcards like for example `*/path/to/file`. The ignore pattern must follow Unix shell-style wildcards like for example `*/path/to/file`.

View File

@@ -11,14 +11,14 @@ This can be useful when working with sensitive data containing passwords for exa
There are two types of transformations available: There are two types of transformations available:
* **read transformations**: used to transform dotfiles before they are installed ([Config](config) key `trans_read`) * **read transformations**: used to transform dotfiles before they are installed ([Config](config.md) key `trans_read`)
* Used for commands `install` and `compare` * Used for commands `install` and `compare`
* They have two arguments: * They have two arguments:
* **{0}** will be replaced with the dotfile to process * **{0}** will be replaced with the dotfile to process
* **{1}** will be replaced with a temporary file to store the result of the transformation * **{1}** will be replaced with a temporary file to store the result of the transformation
* Happens **before** the dotfile is templated with jinja2 (see [templating](templating)) * Happens **before** the dotfile is templated with jinja2 (see [templating](../template/templating.md))
* **write transformations**: used to transform files before updating a dotfile ([Config](config) key `trans_write`) * **write transformations**: used to transform files before updating a dotfile ([Config](config.md) key `trans_write`)
* Used for command `update` * Used for command `update`
* They have two arguments: * They have two arguments:
* **{0}** will be replaced with the file path to update the dotfile with * **{0}** will be replaced with the file path to update the dotfile with
@@ -54,5 +54,5 @@ will result in `abc; f_abc; p1; lastarg`
See See
* [Store compressed directories](store-compressed-directories) * [Store compressed directories](../howto/store-compressed-directories.md)
* [Sensitive dotfiles](sensitive-dotfiles) * [Sensitive dotfiles](../howto/sensitive-dotfiles.md)

View File

@@ -1,10 +1,10 @@
One way for creating symlinks (or any other special files) is to use a combination of One way for creating symlinks (or any other special files) is to use a combination of
[actions](usage-actions) and a *fake* dotfile. [actions](../config/usage-actions.md) and a *fake* dotfile.
Let's say for example you have a list of directories you want to link Let's say for example you have a list of directories you want to link
from under `~/.original` to `~/symlinks`. from under `~/.original` to `~/symlinks`.
```bash ```bash
$ tree ~/.original $ tree ~/.original
/home/user/.original /home/user/.original
├── dir1 ├── dir1
├── dir2 ├── dir2
@@ -28,7 +28,7 @@ The config file would contain different elements
dynvariables: dynvariables:
links_list: "cat {{@@ _dotdrop_dotpath @@}}/links.txt | xargs" links_list: "cat {{@@ _dotdrop_dotpath @@}}/links.txt | xargs"
... ...
variables: variables:
links_dst: "{{@@ env['HOME'] @@}}/.symlinks" links_dst: "{{@@ env['HOME'] @@}}/.symlinks"
links_src: "{{@@ env['HOME'] @@}}/.original" links_src: "{{@@ env['HOME'] @@}}/.original"
... ...
@@ -44,11 +44,11 @@ actions:
The result would be The result would be
```bash ```bash
$ tree ~/.symlinks $ tree ~/.symlinks
/home/user/.symlinks /home/user/.symlinks
├── dir1 -> /home/user/.original/dir1 ├── dir1 -> /home/user/.original/dir1
├── dir2 -> /home/user/.original/dir2 ├── dir2 -> /home/user/.original/dir2
└── dir3 -> /home/user/.original/dir3 └── dir3 -> /home/user/.original/dir3
``` ```
For reference, see [issue 243](https://github.com/deadc0de6/dotdrop/issues/243) For reference, see [issue 243](https://github.com/deadc0de6/dotdrop/issues/243)

View File

@@ -20,7 +20,7 @@ profiles:
... ...
``` ```
Note that the subfiles (`vimrc.d/top` and `vimrc.d/bottom`) Note that the subfiles (`vimrc.d/top` and `vimrc.d/bottom`)
are not known to the config and do not need to be. are not known to the config and do not need to be.
Edit the stored vimrc file to include the other files, for example: Edit the stored vimrc file to include the other files, for example:
@@ -46,12 +46,12 @@ Dotdrop will then automagically include the files into your vimrc when handling
# Merge all files in a directory # Merge all files in a directory
To include all files in a directory, a combination of To include all files in a directory, a combination of
[dynvariables](config-variables#interpreted-variables) [dynvariables](../config/config-variables.md#interpreted-variables-entry)
and [jinja2 directives](http://jinja.pocoo.org/docs/2.10/) have to be used. and [jinja2 directives](http://jinja.pocoo.org/docs/2.10/) have to be used.
Let's say all files in `<dotpath>/toinclude` need to be included into a dotfile. Let's say all files in `<dotpath>/toinclude` need to be included into a dotfile.
First define a [dynvariables](config-variables#interpreted-variables) First define a [dynvariables](../config/config-variables.md#interpreted-variables-entry)
in the config file which will look for files to include in the above directory: in the config file which will look for files to include in the above directory:
```yaml ```yaml
dynvariables: dynvariables:
@@ -59,7 +59,7 @@ dynvariables:
``` ```
Note that `_dotdrop_dotpath` is part of the built-in variables Note that `_dotdrop_dotpath` is part of the built-in variables
(for more see [template variables](templating#template-variables)). (for more see [template variables](../template/templating.md#template-variables)).
And then use the generated list in the dotfile template: And then use the generated list in the dotfile template:
``` ```

View File

@@ -8,7 +8,7 @@
# Available solutions # Available solutions
Two solutions exist, the first one using an unversioned file (see [Environment variables](templating#environment-variables)) Two solutions exist, the first one using an unversioned file (see [Environment variables](../template/templating.md#environment-variables))
and the second using transformations (see [Store encrypted dotfiles](#store-encrypted-dotfiles)). and the second using transformations (see [Store encrypted dotfiles](#store-encrypted-dotfiles)).
# Store encrypted dotfiles # Store encrypted dotfiles
@@ -68,4 +68,4 @@ variables:
gpg_password_file: "/tmp/the-password" gpg_password_file: "/tmp/the-password"
trans_read: trans_read:
_gpg: "gpg2 --batch --yes --passphrase-file <(cat {{@@ gpg_password_file @@}}) -q --for-your-eyes-only --no-tty -d {0} > {1}" _gpg: "gpg2 --batch --yes --passphrase-file <(cat {{@@ gpg_password_file @@}}) -q --for-your-eyes-only --no-tty -d {0} > {1}"
``` ```

View File

@@ -5,14 +5,14 @@ nice to share as much code as possible across the dotfiles, by leveraging
templating and merging them in the same dotfile in Dotdrop's `dotpath`. Here templating and merging them in the same dotfile in Dotdrop's `dotpath`. Here
are a few suggestions about how to achieve this. are a few suggestions about how to achieve this.
* [Brute force templating](brute-force-templating) * [Brute force templating](#brute-force-templating)
* [Profile variables](profile-variables) * [Profile variables](#profile-variables)
* [Jinja macros](jinja-macros) * [Jinja macros](#jinja-macros)
# Brute force templating # Brute force templating
The first approach is sheer use of templating and Dotdrop The first approach is sheer use of templating and variables
[template variables](#template-variables). In order to do this, we need to: In order to do this, we need to:
1. Create the merged dotfile with an arbitrary name somewhere in `dotpath`. 1. Create the merged dotfile with an arbitrary name somewhere in `dotpath`.
2. Create two `dotfile` entries in `config.yaml`, both having the merged 2. Create two `dotfile` entries in `config.yaml`, both having the merged
@@ -64,7 +64,7 @@ export DB_PORT='4521'
Albeit flexible, the previous method is a bit cumbersome for some use cases. Albeit flexible, the previous method is a bit cumbersome for some use cases.
For example, when the dotfiles belong to different profiles, the cleanest For example, when the dotfiles belong to different profiles, the cleanest
solution consists in using solution consists in using
[profile variables](config-variables#profile-variables). This is achieved by: [profile variables](../config/config-variables.md#profile-variables). This is achieved by:
1. Creating the merged dotfile with an arbitrary name somewhere in `dotpath`. 1. Creating the merged dotfile with an arbitrary name somewhere in `dotpath`.
2. Adding some variables in the merged dotfile via templating. 2. Adding some variables in the merged dotfile via templating.

View File

@@ -37,10 +37,10 @@ See https://github.com/deadc0de6/dotdrop/issues/42.
Jinja2 is not able to process non-unicode chars (http://jinja.pocoo.org/docs/2.10/api/). This means that dotfiles using non-unicode chars can still be fully managed by dotdrop however when comparing the local file with the one stored in dotdrop, `compare` will return a difference even if there is none. Jinja2 is not able to process non-unicode chars (http://jinja.pocoo.org/docs/2.10/api/). This means that dotfiles using non-unicode chars can still be fully managed by dotdrop however when comparing the local file with the one stored in dotdrop, `compare` will return a difference even if there is none.
Either replace the non-unicode chars (see below [Re-encode](re-encode)) or accept the fact the comparison shows a difference while there's none. Either replace the non-unicode chars (see below [Re-encode](#re-encode)) or accept the fact the comparison shows a difference while there's none.
See https://github.com/deadc0de6/dotdrop/issues/42. See https://github.com/deadc0de6/dotdrop/issues/42.
# Re-encode # Re-encode
To change an existing file's encoding, you can use `recode UTF-8 <filename>` (see [recode](https://linux.die.net/man/1/recode)) or in vim `:set fileencoding=utf-8`. To change an existing file's encoding, you can use `recode UTF-8 <filename>` (see [recode](https://linux.die.net/man/1/recode)) or in vim `:set fileencoding=utf-8`.

View File

@@ -10,7 +10,7 @@ Where `src` is considered as the file stored in your *dotpath* and
`dst` as the file located in your `$HOME`. `dst` as the file located in your `$HOME`.
Note that if the dotfile is using template directives, it will be symlinked into Note that if the dotfile is using template directives, it will be symlinked into
`~/.config/dotdrop` instead of directly into your *dotpath* `~/.config/dotdrop` instead of directly into your *dotpath*
(see [Templating symlinked dotfiles](#templating-symlinked-dotfiles)) (see [Templating symlinked dotfiles](#templating-symlinked-dotfiles))
* [Link children](#link-children) * [Link children](#link-children)
@@ -22,7 +22,7 @@ Note that if the dotfile is using template directives, it will be symlinked into
This feature can be very useful for dotfiles when you don't want the entire This feature can be very useful for dotfiles when you don't want the entire
directory to be symlink but still want to keep a clean config files (with a directory to be symlink but still want to keep a clean config files (with a
limited number of entries). limited number of entries).
*Make sure to do a backup of your dotfiles with something like `cp -r <my-important-dotfile>{,.bak}`* *Make sure to do a backup of your dotfiles with something like `cp -r <my-important-dotfile>{,.bak}`*
@@ -85,11 +85,11 @@ $ tree -L 1 ~/.vim
# Templating symlinked dotfiles # Templating symlinked dotfiles
For dotfiles not using any templating directives, those are directly linked For dotfiles not using any templating directives, those are directly linked
to dotdrop's `dotpath` directory (see [Config](config)). to dotdrop's `dotpath` directory (see [Config](../config/config.md)).
When using templating directives however the dotfiles are first installed into When using templating directives however the dotfiles are first installed into
`workdir` (defaults to *~/.config/dotdrop*, see [Config](config)) `workdir` (defaults to *~/.config/dotdrop*, see [Config](../config/config.md))
and then symlinked there. and then symlinked there.
This applies to both dotfiles with `link: link` and `link: link_children`. This applies to both dotfiles with `link: link` and `link: link_children`.
For example For example

View File

@@ -43,8 +43,8 @@ Following variables are available in templates:
* `{{@@ _dotdrop_cfgpath @@}}` contains the absolute path to the [config file](https://github.com/deadc0de6/dotdrop/wiki/config). * `{{@@ _dotdrop_cfgpath @@}}` contains the absolute path to the [config file](https://github.com/deadc0de6/dotdrop/wiki/config).
* `{{@@ _dotdrop_workdir @@}}` contains the [workdir](https://github.com/deadc0de6/dotdrop/wiki/config) absolute path. * `{{@@ _dotdrop_workdir @@}}` contains the [workdir](https://github.com/deadc0de6/dotdrop/wiki/config) absolute path.
* dotfile specific variables (see [Dotfile variables](#dotfile-variables)) * dotfile specific variables (see [Dotfile variables](#dotfile-variables))
* config variables (see [Variables](config-variables)). * config variables (see [Variables](../config/config-variables.md)).
* config interpreted variables (see [Interpreted variables](config-variables)). * config interpreted variables (see [Interpreted variables](../config/config-variables.md)).
# Dotfile variables # Dotfile variables
@@ -73,7 +73,7 @@ It's possible to access environment variables inside the templates.
``` ```
This allows for storing host-specific properties and/or secrets in environment variables. This allows for storing host-specific properties and/or secrets in environment variables.
It is recommended to use `variables` (see [Config variables](#config-variables)) It is recommended to use `variables` (see [Config variables](../config/config-variables.md))
instead of environment variables unless these contain sensitive information that instead of environment variables unless these contain sensitive information that
shouldn't be versioned in git. shouldn't be versioned in git.
@@ -215,7 +215,7 @@ It is possible to avoid having an empty rendered template being
deployed by setting the `ignoreempty` entry to *true*. This can be set deployed by setting the `ignoreempty` entry to *true*. This can be set
globally for all dotfiles or only for specific dotfiles. globally for all dotfiles or only for specific dotfiles.
For more see the [Config](config). For more see the [Config](../config/config.md).
# Include file or template in template # Include file or template in template

View File

@@ -12,8 +12,8 @@ Run `dotdrop --help` to see all available options.
* [Update dotfiles](#update-dotfiles) * [Update dotfiles](#update-dotfiles)
* [Remove dotfiles](#remove-dotfiles) * [Remove dotfiles](#remove-dotfiles)
* Uses * Uses
* [Use actions](usage-actions) * [Use actions](config/usage-actions.md)
* [Use transformations](usage-transformations) * [Use transformations](config/usage-transformations.md)
* [Update dotdrop](#update-dotdrop) * [Update dotdrop](#update-dotdrop)
* [Environment variables](#environment-variables) * [Environment variables](#environment-variables)
* [User tricks](#user-tricks) * [User tricks](#user-tricks)
@@ -47,7 +47,7 @@ options
For more detail, see the usage with `dotdrop --help` For more detail, see the usage with `dotdrop --help`
To ignore specific pattern during installation see [the dedicated wiki page](ignore-pattern) To ignore specific pattern during installation see [the dedicated wiki page](config/ignore-pattern.md)
# Compare dotfiles # Compare dotfiles
@@ -60,7 +60,7 @@ The diffing is done by `diff` in the backend, one can provide its specific
diff command using the config option `diff_command`. diff command using the config option `diff_command`.
To ignore specific pattern, To ignore specific pattern,
see [the dedicated wiki page](ignore-pattern) see [the dedicated wiki page](config/ignore-pattern.md)
It is also possible to install all dotfiles for a specific profile It is also possible to install all dotfiles for a specific profile
in a temporary directory in order to manually compare them with in a temporary directory in order to manually compare them with
@@ -176,11 +176,11 @@ $ dotdrop update --key f_vimrc
If not argument is provided, all dotfiles for the selected profile are updated. If not argument is provided, all dotfiles for the selected profile are updated.
To ignore specific pattern, To ignore specific pattern,
see [the dedicated wiki page](ignore-pattern) see [the dedicated wiki page](config/ignore-pattern.md)
There are two cases when updating a dotfile: There are two cases when updating a dotfile:
## The dotfile doesn't use [templating](templating) ## The dotfile doesn't use [templating](template/templating.md)
The new version of the dotfile is copied to the *dotpath* directory and overwrites The new version of the dotfile is copied to the *dotpath* directory and overwrites
the old version. If git is used to version the dotfiles stored by dotdrop, the git command the old version. If git is used to version the dotfiles stored by dotdrop, the git command
@@ -191,7 +191,7 @@ $ dotdrop update ~/.vimrc
$ git diff $ git diff
``` ```
## The dotfile uses [templating](templating) ## The dotfile uses [templating](template/templating.md)
The dotfile must be manually updated, three solutions can be used to identify the The dotfile must be manually updated, three solutions can be used to identify the
changes to apply to the template: changes to apply to the template: