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

improve --as doc for #368

This commit is contained in:
deadc0de6
2022-11-29 10:11:21 +01:00
parent 9bbbe2796e
commit 8b8da70b44

15
docs/usage.md vendored
View File

@@ -59,15 +59,20 @@ Importing `~/.mutt/colors` and then `~/.vim/colors` will result in:
* `d_colors` and `d_vim_colors` in the short format * `d_colors` and `d_vim_colors` in the short format
* `d_mutt_colors` and `d_vim_colors` in the long format * `d_mutt_colors` and `d_vim_colors` in the long format
A dotfile can be imported as a different file with the use It is possible to import a dotfile while pretending it was at a different
of the command line switch `--as` (effectively modifying the `src` part path with the use of `--as` what will effectively modify the `src` path
of the dotfile in the config, that is the location of the dotfile in the of the generated dotfile entry in the config as well as the location of the file
`dotpath`). It is however recommended in the *dotpath*.
The argument to `--as` is expected to be an absolute path and will be made
absolute in case it isn't (specifying `--as test` will result in something like
`--as <current-working-directory>/test`). It is however recommended
to use [templating](template/templating.md) to avoid duplicates and optimize to use [templating](template/templating.md) to avoid duplicates and optimize
dotfile management. dotfile management instead of using `--as`.
```bash ```bash
# imported to <dotpath>/zshrc.test
$ dotdrop import ~/.zshrc --as=~/.zshrc.test $ dotdrop import ~/.zshrc --as=~/.zshrc.test
``` ```
see [issue #220](https://github.com/deadc0de6/dotdrop/issues/220) and [issue #368](https://github.com/deadc0de6/dotdrop/issues/368).
By importing a path using the profile special keyword `ALL`, a dotfile will be created By importing a path using the profile special keyword `ALL`, a dotfile will be created
in the config but won't be associated to any profile. in the config but won't be associated to any profile.