sam: make current filename available to shell commands in $f (thanks aiju)

This commit is contained in:
cinap_lenrek 2016-09-22 10:49:48 +02:00
parent 483e54a0d3
commit 52cacba37c

View file

@ -93,6 +93,7 @@ plan9(File *f, int type, String *s, int nest)
close(0); /* so it won't read from terminal */
open("/dev/null", 0);
}
putenv("f", Strtoc(&f->name));
execl(SHPATH, SH, "-c", Strtoc(&plan9cmd), nil);
exits("exec");
}