aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/man1/acme.12
-rw-r--r--src/cmd/acme/exec.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/man/man1/acme.1 b/man/man1/acme.1
index 3dc1f2af..aa02f770 100644
--- a/man/man1/acme.1
+++ b/man/man1/acme.1
@@ -527,6 +527,8 @@ producing output in a window labeled
.BR /home/rob/sam/+Errors .
The environment of such commands contains the variable
.B $%
+and
+.B $samfile
with value set to the filename of the window in which the command is run,
and
.B $winid
diff --git a/src/cmd/acme/exec.c b/src/cmd/acme/exec.c
index 39d05eca..ae6668c6 100644
--- a/src/cmd/acme/exec.c
+++ b/src/cmd/acme/exec.c
@@ -1421,6 +1421,7 @@ runproc(void *argvp)
if(filename){
putenv("%", filename);
+ putenv("samfile", filename);
free(filename);
}
c->md = fsysmount(rdir, ndir, incl, nincl);