1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-05 21:23:02 +00:00

adding key_prefix and key_separator for #335

This commit is contained in:
deadc0de6
2021-11-21 22:53:27 +01:00
parent e5edc8e604
commit 6722dcb718
7 changed files with 162 additions and 21 deletions

View File

@@ -33,6 +33,8 @@ Entry | Description | Default
`import_variables` | List of paths to load variables from (absolute paths or relative to the config file location; see [Import variables from file](config-details.md#import_variables-entry)) | -
`instignore` | List of patterns to ignore when installing, applied to all dotfiles (enclose in quotes when using wildcards; see [ignore patterns](config.md#ignore-patterns)) | -
`keepdot` | Preserve leading dot when importing hidden file in the `dotpath` | false
`key_prefix` | Prefix dotfile key on `import` with `f<key_separator>` for file and `d<key_separator>` for directory | true
`key_separator` | Separator to use on dotfile key generation on `import` | `_`
`link_dotfile_default` | Set a dotfile's `link` attribute to this value when undefined. Possible values: *nolink*, *link* (See [Symlinking dotfiles](config.md#symlinking-dotfiles)) | `nolink`
`link_on_import` | Set a dotfile's `link` attribute to this value when importing. Possible values: *nolink*, *link* [Symlinking dotfiles](config.md#symlinking-dotfiles)) | `nolink`
`longkey` | Use long keys for dotfiles when importing (See [Import dotfiles](usage.md#import-dotfiles)) | false

View File

@@ -42,12 +42,13 @@ $ dotdrop import ~/.xinitrc
```
You can control how the dotfile key is generated in the config file
with the config entry `longkey` (defaults to *false*).
with the following config entries:
Two formats are available:
* *short format* (default): take the shortest unique path
* *long format*: take the full path
* `longkey`
* *short format* (default): take the shortest unique path
* *long format*: take the full path
* `key_prefix`: defines if the key is prefixed with `f<key_separator>` for file and `d<key_separator>` for directory
* `key_separator`: defines the separator to use (defaults to `_`)
For example, `~/.config/awesome/rc.lua` gives: