tacme: set $samfile (same as $%) during execution - plan9port - [fork] Plan 9 from user space
 (HTM) git clone git://src.adamsgaard.dk/plan9port
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 2589c5c6ee1f582810a037a934280b29fe8c5e55
 (DIR) parent e19fde358468d55bc60664691978ae86c7641015
 (HTM) Author: Marius Eriksen <marius.eriksen@gmail.com>
       Date:   Sun, 25 Nov 2012 22:56:08 -0500
       
       acme: set $samfile (same as $%) during execution
       
       R=rsc
       CC=plan9port.codebot
       http://codereview.appspot.com/6854092
       
       Diffstat:
         M man/man1/acme.1                     |       2 ++
         M src/cmd/acme/exec.c                 |       1 +
       
       2 files changed, 3 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git a/man/man1/acme.1 b/man/man1/acme.1
       t@@ -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
 (DIR) diff --git a/src/cmd/acme/exec.c b/src/cmd/acme/exec.c
       t@@ -1421,6 +1421,7 @@ runproc(void *argvp)
        
                        if(filename){
                                putenv("%", filename);
       +                        putenv("samfile", filename);
                                free(filename);
                        }
                        c->md = fsysmount(rdir, ndir, incl, nincl);