acme: set $samfile (same as $%) during execution

R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/6854092
This commit is contained in:
Marius Eriksen 2012-11-25 22:56:08 -05:00 committed by Russ Cox
parent e19fde3584
commit 2589c5c6ee
2 changed files with 3 additions and 0 deletions

View file

@ -527,6 +527,8 @@ producing output in a window labeled
.BR /home/rob/sam/+Errors . .BR /home/rob/sam/+Errors .
The environment of such commands contains the variable The environment of such commands contains the variable
.B $% .B $%
and
.B $samfile
with value set to the filename of the window in which the command is run, with value set to the filename of the window in which the command is run,
and and
.B $winid .B $winid

View file

@ -1421,6 +1421,7 @@ runproc(void *argvp)
if(filename){ if(filename){
putenv("%", filename); putenv("%", filename);
putenv("samfile", filename);
free(filename); free(filename);
} }
c->md = fsysmount(rdir, ndir, incl, nincl); c->md = fsysmount(rdir, ndir, incl, nincl);