Skip to content

Commit 4320d05

Browse files
author
Alistair Turnbull
committed
README.md: Document NANCY_INPUT and NANCY_OUTPUT
1 parent 307bbc0 commit 4320d05

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
@@ -213,6 +213,16 @@ argument to a program, the program will be given the actual path, rather
213213
than the string `$realpath`. Arguments and command inputs are processed
214214
from left to right.
215215

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

218228
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
@@ -196,6 +196,16 @@ argument to a program, the program will be given the actual path, rather
196196
than the string `\$realpath`. Arguments and command inputs are processed
197197
from left to right.
198198

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

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

0 commit comments

Comments
 (0)