mirror of
1
0
Fork 0

Add use_globs to readme

This commit is contained in:
Ben Klein 2018-01-31 18:32:00 -05:00 committed by Anish Athalye
parent 564d16fcd5
commit 7ebb601a10
1 changed files with 26 additions and 8 deletions

View File

@ -165,17 +165,22 @@ files if necessary. Environment variables in paths are automatically expanded.
Link commands are specified as a dictionary mapping targets to source Link commands are specified as a dictionary mapping targets to source
locations. Source locations are specified relative to the base directory (that locations. Source locations are specified relative to the base directory (that
is specified when running the installer). Directory names should *not* contain is specified when running the installer). If linking directories, *do not* include a trailing slash.
a trailing "/" character.
Link commands support an (optional) extended configuration. In this type of Link commands support an (optional) extended configuration. In this type of
configuration, instead of specifying source locations directly, targets are configuration, instead of specifying source locations directly, targets are
mapped to extended configuration dictionaries. These dictionaries map `path` to mapped to extended configuration dictionaries.
the source path, specify `create` as `true` if the parent directory should be
created if necessary, specify `relink` as `true` if incorrect symbolic links Available extended configuration parameters:
should be automatically overwritten, specify `force` as `true` if the file or
directory should be forcibly linked, and specify `relative` as `true` if the | Link Option | Explanation |
symbolic link should have a relative path. | -- | -- |
| `path` | The target for the symlink, the same as in the shortcut syntax (default:null, automatic (see below)) |
| `create` | When true, create parent directories to the link as needed. (default:false) |
| `relink` | Removes the old target if it's a symlink (default:false) |
| `force` | Force removes the old target, file or folder, and forces a new link (default:false) |
| `relative` | Use a relative path when creating the symlink (default:false, absolute links) |
| `use_glob` | Treat a `*` character as a wildcard, and perform link operations on all of those matches (default:false) |
#### Example #### Example
@ -207,6 +212,10 @@ the following three config files equivalent:
~/.zshrc: ~/.zshrc:
force: true force: true
path: zshrc path: zshrc
~/.config/:
use_glob: true
path: config/*
relink: true
``` ```
```yaml ```yaml
@ -217,6 +226,10 @@ the following three config files equivalent:
relink: true relink: true
~/.zshrc: ~/.zshrc:
force: true force: true
~/.config/:
use_glob: true
path: config/*
relink: true
``` ```
```json ```json
@ -230,6 +243,11 @@ the following three config files equivalent:
}, },
"~/.zshrc": { "~/.zshrc": {
"force": true "force": true
},
"~/.config/": {
"use_glob": true,
"path": "config/*",
"relink": true
} }
} }
} }