summaryrefslogtreecommitdiff
path: root/Src/builtin.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2007-12-11 14:05:52 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2007-12-11 14:05:52 +0000
commit04f42fdbdf14924e2e2b8bce4c1d1b4537747676 (patch)
treee4527a76d216f2edc3bbb56e2d3aa14aa3b253d8 /Src/builtin.c
parent8718b9bf0973d21b8e33d67b28a67ab0e0153991 (diff)
downloadzsh-04f42fdbdf14924e2e2b8bce4c1d1b4537747676.tar.gz
zsh-04f42fdbdf14924e2e2b8bce4c1d1b4537747676.zip
24210: set -o should abort on failure
Diffstat (limited to 'Src/builtin.c')
-rw-r--r--Src/builtin.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/Src/builtin.c b/Src/builtin.c
index d69ab5591..2e0d249f3 100644
--- a/Src/builtin.c
+++ b/Src/builtin.c
@@ -567,9 +567,9 @@ bin_set(char *nam, char **args, UNUSED(Options ops), UNUSED(int func))
return 0;
}
if(!(optno = optlookup(*args)))
- zwarnnam(nam, "no such option: %s", *args);
+ zerrnam(nam, "no such option: %s", *args);
else if(dosetopt(optno, action, 0))
- zwarnnam(nam, "can't change option: %s", *args);
+ zerrnam(nam, "can't change option: %s", *args);
break;
} else if(**args == 'A') {
if(!*++*args)
@@ -588,13 +588,15 @@ bin_set(char *nam, char **args, UNUSED(Options ops), UNUSED(int func))
sort = action ? 1 : -1;
else {
if (!(optno = optlookupc(**args)))
- zwarnnam(nam, "bad option: -%c", **args);
+ zerrnam(nam, "bad option: -%c", **args);
else if(dosetopt(optno, action, 0))
- zwarnnam(nam, "can't change option: -%c", **args);
+ zerrnam(nam, "can't change option: -%c", **args);
}
}
args++;
}
+ if (errflag)
+ return 1;
doneoptions:
inittyptab();