diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2016-09-22 10:49:48 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2016-09-22 10:49:48 +0200 |
commit | 52cacba37c6f3a125ef931afa4b9c2cdb7438fef (patch) | |
tree | 0bac5797c253382c036636dc3c6f7934fb14bdb6 /sys/src/cmd/sam/shell.c | |
parent | 483e54a0d33d6f9237b2af7220d7f384551e67ce (diff) |
sam: make current filename available to shell commands in $f (thanks aiju)
Diffstat (limited to 'sys/src/cmd/sam/shell.c')
-rw-r--r-- | sys/src/cmd/sam/shell.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/src/cmd/sam/shell.c b/sys/src/cmd/sam/shell.c index c0eced359..7c3a0b25c 100644 --- a/sys/src/cmd/sam/shell.c +++ b/sys/src/cmd/sam/shell.c @@ -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"); } |