You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+7
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@ Storing dotfiles in git repositories allows them to be shared across multiple co
6
6
7
7
## Features
8
8
* Make string substitutions in files according to configured key/value pairs.
9
+
* Use output from arbitrary shell commands in templated dotfiles (e.g. for passwords with GNU Pass).
9
10
* Toggle chunks of files per feature flags.
10
11
* Binary files are copied without templating.
11
12
* File permissions are preserved.
@@ -39,6 +40,12 @@ asdf=aoeu
39
40
```
40
41
will replace all occurances of `{SUBSTITION ONE}` with `123`, `[font size]` with `19`, and `asdf` with `aoeu`.
41
42
43
+
#### Arbitrary Shell Commands
44
+
If the `=` separating key/value pairs is immediately proceeded by `SHELL `, dot-templater will run the provided command and use the stdout when templating dotfiles. Providing following line in a config file will substitute any occurrance of `SHELL_COMMAND` with `1234`.
45
+
```
46
+
SHELL_COMMAND=SHELL echo 1234
47
+
```
48
+
42
49
#### Feature Flags
43
50
Any line in the rules configuration file that does not include a `=` character and is not a comment will enable the feature name that matches the line. Dotfiles can designate togglable features with three octothorpes followed by the feature name.
0 commit comments