aboutsummaryrefslogtreecommitdiff
path: root/MANUAL.txt
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-03-05 10:44:28 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2021-03-05 10:46:01 -0800
commit6dd7520cc4b3816ae13ec486ce0909b9b881d240 (patch)
tree06a2e06377c18c1662ef7bc84649f8784a91eaaa /MANUAL.txt
parenta8324690061d561583f2cb583cfb28591f500181 (diff)
downloadpandoc-6dd7520cc4b3816ae13ec486ce0909b9b881d240.tar.gz
Implement environment variable interpolation in defaults files.
This allows the syntax `${HOME}` to be used, in fields that expect file paths only. Any environment variable may be interpolated in this way. A warning will be raised for undefined variables. The special variable `USERDATA` is automatically set to the user data directory in force when the defaults file is parsed. (Note: it may be different from the eventual user data directory, if the defaults file or further command line options change that.) Closes #5982. Closes #5977. Closes #6108 (path not taken).
Diffstat (limited to 'MANUAL.txt')
-rw-r--r--MANUAL.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/MANUAL.txt b/MANUAL.txt
index d97cbcbc9..f06293dd3 100644
--- a/MANUAL.txt
+++ b/MANUAL.txt
@@ -1672,6 +1672,21 @@ one line:
verbosity: INFO
```
+In fields that expect a file path (or list of file paths), the
+following syntax may be used to interpolate environment variables:
+
+``` yaml
+csl: ${HOME}/mycsldir/special.csl
+```
+
+`${USERDATA}` may also be used; this will always resolve to the
+user data directory that is current when the defaults file is
+parsed, regardless of the setting of the environment
+variable `USERDATA`.
+
+This environment variable interpolation syntax *only* works in
+fields that expect file paths.
+
Default files can be placed in the `defaults` subdirectory of
the user data directory and used from any directory. For
example, one could create a file specifying defaults for writing