diff options
author | schweikh <schweikh@FreeBSD.org> | 2006-04-14 13:59:03 +0000 |
---|---|---|
committer | schweikh <schweikh@FreeBSD.org> | 2006-04-14 13:59:03 +0000 |
commit | 5eb49ee7ff54b2979444993f7744834149d1951a (patch) | |
tree | ee8280fc440c940717917e0b88410a81497967ec | |
parent | 97c4cd6d343bd64bdee83e754fd4e463c1201b31 (diff) | |
download | FreeBSD-src-5eb49ee7ff54b2979444993f7744834149d1951a.zip FreeBSD-src-5eb49ee7ff54b2979444993f7744834149d1951a.tar.gz |
Output something reasonable for regular and expanded here-documents.
I would have chosen the EOF markers, but they are no longer available
AFAICS, so output "<<HERE" and "<<XHERE" instead.
(NOTE: These changes only affect DEBUG output.)
-rw-r--r-- | bin/sh/show.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/sh/show.c b/bin/sh/show.c index 1046428..baae549 100644 --- a/bin/sh/show.c +++ b/bin/sh/show.c @@ -144,6 +144,8 @@ shcmd(union node *cmd, FILE *fp) case NFROM: s = "<"; dftfd = 0; break; case NFROMTO: s = "<>"; dftfd = 0; break; case NFROMFD: s = "<&"; dftfd = 0; break; + case NHERE: s = "<<"; dftfd = 0; break; + case NXHERE: s = "<<"; dftfd = 0; break; default: s = "*error*"; dftfd = 0; break; } if (np->nfile.fd != dftfd) @@ -154,6 +156,10 @@ shcmd(union node *cmd, FILE *fp) fprintf(fp, "%d", np->ndup.dupfd); else fprintf(fp, "-"); + } else if (np->nfile.type == NHERE) { + fprintf(fp, "HERE"); + } else if (np->nfile.type == NXHERE) { + fprintf(fp, "XHERE"); } else { sharg(np->nfile.fname, fp); } |