diff options
author | Casey Rodarmor <casey@rodarmor.com> | 2016-11-18 15:21:27 -0800 |
---|---|---|
committer | Anish Athalye <me@anishathalye.com> | 2016-11-23 14:11:45 -0500 |
commit | d2e20c77db3811d8d0ef640a743f8dcc85075fdc (patch) | |
tree | 8e1b400afc354b383d16201d1855cc0aa6f472e4 /README.md | |
parent | b482cbda585848c0d5f5345711fe338e319c0adf (diff) |
Allow empty link sources
If the source for a link is null, use the basename of the destination
with a single leading '.' removed, if present.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 43 |
1 files changed, 43 insertions, 0 deletions
@@ -189,6 +189,49 @@ symbolic link should have a relative path. path: zshrc ``` +If the source location is omitted or set to `null`, Dotbot will use the +basename of the destination, with a leading `.` stripped if present. This makes +the following three config files equivalent: + +```yaml +- link: + ~/bin/ack: ack + ~/.vim: vim + ~/.vimrc: + relink: true + path: vimrc + ~/.zshrc: + force: true + path: zshrc +``` + +```yaml +- link: + ~/bin/ack: + ~/.vim: + ~/.vimrc: + relink: true + ~/.zshrc: + force: true +``` + +```json +[ + { + "link": { + "~/bin/ack": null, + "~/.vim": null, + "~/.vimrc": { + "relink": true + }, + "~/.zshrc": { + "force": true + } + } + } +] +``` + ### Shell Shell commands specify shell commands to be run. Shell commands are run in the |