Skip to content

Commit 082b007

Browse files
Alistair Turnbullrrthomas
authored andcommitted
README.md: Document NANCY_INPUT and NANCY_OUTPUT
1 parent eb99333 commit 082b007

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,16 @@ argument to a program, the program will be given the actual path, rather
215215
than the string `$realpath`. Arguments and command inputs are processed
216216
from left to right.
217217

218+
### Environment variables provided by `$run`
219+
220+
When Nancy `$run`s a program, it sets the following environment variables:
221+
222+
- NANCY_INPUT - the root of whichever of the input trees contains the file that
223+
is being expanded: a prefix of `$realpath`. The file's name, relative to
224+
`NANCY_INPUT`, is `$path`.
225+
226+
- NANCY_OUTPUT - the root of the output tree: a prefix of `$outputpath`.
227+
218228
### Escaping
219229

220230
To prevent a comma from being interpreted as an argument separator, put a

README.nancy.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,16 @@ argument to a program, the program will be given the actual path, rather
198198
than the string `\$realpath`. Arguments and command inputs are processed
199199
from left to right.
200200

201+
### Environment variables provided by `\$run`
202+
203+
When Nancy `\$run`s a program, it sets the following environment variables:
204+
205+
- NANCY_INPUT - the root of whichever of the input trees contains the file that
206+
is being expanded: a prefix of `\$realpath`. The file's name, relative to
207+
`NANCY_INPUT`, is `\$path`.
208+
209+
- NANCY_OUTPUT - the root of the output tree: a prefix of `\$outputpath`.
210+
201211
### Escaping
202212

203213
To prevent a comma from being interpreted as an argument separator, put a

0 commit comments

Comments
 (0)