diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 2000-02-09 01:15:23 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 2000-02-09 01:15:23 +0000 |
commit | 6845f57d4cf6cb45a04fa8e10cfdb3ad7d30f3c4 (patch) | |
tree | 7368f9a7d6624760fe7fd0d0f3dcd88c5191238e /Src | |
parent | deac7dec248d92a1ff93406464988d85c9be39fd (diff) | |
download | zsh-6845f57d4cf6cb45a04fa8e10cfdb3ad7d30f3c4.tar.gz zsh-6845f57d4cf6cb45a04fa8e10cfdb3ad7d30f3c4.tar.xz zsh-6845f57d4cf6cb45a04fa8e10cfdb3ad7d30f3c4.zip |
zsh-workers/9625
Diffstat (limited to 'Src')
-rw-r--r-- | Src/exec.c | 7 | ||||
-rw-r--r-- | Src/options.c | 2 | ||||
-rw-r--r-- | Src/zsh.h | 2 |
3 files changed, 5 insertions, 6 deletions
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, |