about summary refs log tree commit diff
path: root/Src/exec.c
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-02-08 11:02:23 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-02-08 11:02:23 +0000
commita1e0eed861cf18b043107f50823a9a498347d89f (patch)
tree595098ab9f219d746d9a68f4ed0e95ac12289d83 /Src/exec.c
parente49689cba8168ee0c9c1bb8184f207f76583e629 (diff)
downloadzsh-a1e0eed861cf18b043107f50823a9a498347d89f.tar.gz
zsh-a1e0eed861cf18b043107f50823a9a498347d89f.tar.xz
zsh-a1e0eed861cf18b043107f50823a9a498347d89f.zip
zsh-workers/9617
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/Src/exec.c b/Src/exec.c
index fb73e124e..7b45a1ba2 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -1661,11 +1661,16 @@ execcmd(Estate state, int input, int output, int how, int last1)
 		    } else if (varspc) {
 			nullexec = 2;
 			break;
-		    } else if (!nullcmd || !*nullcmd ||
-			       (cflags & BINF_PREFIX)) {
+		    } else if (((!nullcmd || !*nullcmd || opts[IGNORENULLCMD])
+				&& !opts[SHNULLCMD]) 
+			       ||(cflags & BINF_PREFIX)) {
 			zerr("redirection with no command", NULL, 0);
 			errflag = lastval = 1;
 			return;
+		    } else if (!nullcmd || !*nullcmd || opts[IGNORENULLCMD]) {
+			if (!args)
+			    args = newlinklist();
+			addlinknode(args, dupstring(":"));
 		    } else if (readnullcmd && *readnullcmd &&
 			       ((Redir) peekfirst(redir))->type == READ &&
 			       !nextnode(firstnode(redir))) {