From 6845f57d4cf6cb45a04fa8e10cfdb3ad7d30f3c4 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Wed, 9 Feb 2000 01:15:23 +0000 Subject: zsh-workers/9625 --- Src/exec.c | 7 +++---- Src/options.c | 2 +- Src/zsh.h | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) (limited to 'Src') diff --git a/Src/exec.c b/Src/exec.c index 7b45a1ba2..7ea1147b6 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -1661,13 +1661,12 @@ execcmd(Estate state, int input, int output, int how, int last1) } else if (varspc) { nullexec = 2; break; - } else if (((!nullcmd || !*nullcmd || opts[IGNORENULLCMD]) - && !opts[SHNULLCMD]) - ||(cflags & BINF_PREFIX)) { + } else if (!nullcmd || !*nullcmd || opts[CSHNULLCMD] || + (cflags & BINF_PREFIX)) { zerr("redirection with no command", NULL, 0); errflag = lastval = 1; return; - } else if (!nullcmd || !*nullcmd || opts[IGNORENULLCMD]) { + } else if (!nullcmd || !*nullcmd || opts[SHNULLCMD]) { if (!args) args = newlinklist(); addlinknode(args, dupstring(":")); diff --git a/Src/options.c b/Src/options.c index 3d657edcb..3e130a63e 100644 --- a/Src/options.c +++ b/Src/options.c @@ -102,6 +102,7 @@ static struct optname optns[] = { {NULL, "cshjunkiehistory", OPT_EMULATE|OPT_CSH, CSHJUNKIEHISTORY}, {NULL, "cshjunkieloops", OPT_EMULATE|OPT_CSH, CSHJUNKIELOOPS}, {NULL, "cshjunkiequotes", OPT_EMULATE|OPT_CSH, CSHJUNKIEQUOTES}, +{NULL, "cshnullcmd", OPT_EMULATE|OPT_CSH, CSHNULLCMD}, {NULL, "cshnullglob", OPT_EMULATE|OPT_CSH, CSHNULLGLOB}, {NULL, "equals", OPT_EMULATE|OPT_ZSH, EQUALS}, {NULL, "errexit", OPT_EMULATE, ERREXIT}, @@ -134,7 +135,6 @@ static struct optname optns[] = { {NULL, "hup", OPT_EMULATE|OPT_ZSH, HUP}, {NULL, "ignorebraces", OPT_EMULATE|OPT_SH, IGNOREBRACES}, {NULL, "ignoreeof", 0, IGNOREEOF}, -{NULL, "ignorenullcmd", OPT_EMULATE|OPT_NONZSH, IGNORENULLCMD}, {NULL, "incappendhistory", 0, INCAPPENDHISTORY}, {NULL, "interactive", OPT_SPECIAL, INTERACTIVE}, {NULL, "interactivecomments", OPT_BOURNE, INTERACTIVECOMMENTS}, diff --git a/Src/zsh.h b/Src/zsh.h index 9dc7f2087..ea8ba8598 100644 --- a/Src/zsh.h +++ b/Src/zsh.h @@ -1269,6 +1269,7 @@ enum { CSHJUNKIEHISTORY, CSHJUNKIELOOPS, CSHJUNKIEQUOTES, + CSHNULLCMD, CSHNULLGLOB, EQUALS, ERREXIT, @@ -1301,7 +1302,6 @@ enum { HUP, IGNOREBRACES, IGNOREEOF, - IGNORENULLCMD, INCAPPENDHISTORY, INTERACTIVE, INTERACTIVECOMMENTS, -- cgit 1.4.1