1
0
Fork 0
mirror of synced 2024-12-22 06:01:07 -05:00

Rename 'use_glob' to 'glob'

This commit is contained in:
Anish Athalye 2018-04-06 21:59:28 +05:30
parent 7ebb601a10
commit 7d069b4ac8
2 changed files with 6 additions and 6 deletions

View file

@ -180,7 +180,7 @@ Available extended configuration parameters:
| `relink` | Removes the old target if it's a symlink (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) | | `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) | | `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) | | `glob` | Treat a `*` character as a wildcard, and perform link operations on all of those matches (default:false) |
#### Example #### Example
@ -213,7 +213,7 @@ the following three config files equivalent:
force: true force: true
path: zshrc path: zshrc
~/.config/: ~/.config/:
use_glob: true glob: true
path: config/* path: config/*
relink: true relink: true
``` ```
@ -227,7 +227,7 @@ the following three config files equivalent:
~/.zshrc: ~/.zshrc:
force: true force: true
~/.config/: ~/.config/:
use_glob: true glob: true
path: config/* path: config/*
relink: true relink: true
``` ```
@ -245,7 +245,7 @@ the following three config files equivalent:
"force": true "force": true
}, },
"~/.config/": { "~/.config/": {
"use_glob": true, "glob": true,
"path": "config/*", "path": "config/*",
"relink": true "relink": true
} }

View file

@ -28,14 +28,14 @@ class Link(dotbot.Plugin):
force = defaults.get('force', False) force = defaults.get('force', False)
relink = defaults.get('relink', False) relink = defaults.get('relink', False)
create = defaults.get('create', False) create = defaults.get('create', False)
use_glob = defaults.get('use_glob', False) use_glob = defaults.get('glob', False)
if isinstance(source, dict): if isinstance(source, dict):
# extended config # extended config
relative = source.get('relative', relative) relative = source.get('relative', relative)
force = source.get('force', force) force = source.get('force', force)
relink = source.get('relink', relink) relink = source.get('relink', relink)
create = source.get('create', create) create = source.get('create', create)
use_glob = source.get('use_glob', use_glob) use_glob = source.get('glob', use_glob)
path = self._default_source(destination, source.get('path')) path = self._default_source(destination, source.get('path'))
else: else:
path = self._default_source(destination, source) path = self._default_source(destination, source)