mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-30 05:40:58 +01:00
24210: set -o should abort on failure
This commit is contained in:
parent
8718b9bf09
commit
04f42fdbdf
2 changed files with 9 additions and 5 deletions
|
|
@ -1,7 +1,9 @@
|
||||||
2007-12-11 Peter Stephenson <pws@csr.com>
|
2007-12-11 Peter Stephenson <pws@csr.com>
|
||||||
|
|
||||||
|
* 24210: Src/builtin.c: "set -o" should abort on failure.
|
||||||
|
|
||||||
* unposted: Config/version.mk, Completion/Unix/Command/.distfiles:
|
* unposted: Config/version.mk, Completion/Unix/Command/.distfiles:
|
||||||
4.3.4-dev-4.
|
Functions/Zle/.distfiles: 4.3.4-dev-4.
|
||||||
|
|
||||||
2007-12-10 Peter Stephenson <pws@csr.com>
|
2007-12-10 Peter Stephenson <pws@csr.com>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -567,9 +567,9 @@ bin_set(char *nam, char **args, UNUSED(Options ops), UNUSED(int func))
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if(!(optno = optlookup(*args)))
|
if(!(optno = optlookup(*args)))
|
||||||
zwarnnam(nam, "no such option: %s", *args);
|
zerrnam(nam, "no such option: %s", *args);
|
||||||
else if(dosetopt(optno, action, 0))
|
else if(dosetopt(optno, action, 0))
|
||||||
zwarnnam(nam, "can't change option: %s", *args);
|
zerrnam(nam, "can't change option: %s", *args);
|
||||||
break;
|
break;
|
||||||
} else if(**args == 'A') {
|
} else if(**args == 'A') {
|
||||||
if(!*++*args)
|
if(!*++*args)
|
||||||
|
|
@ -588,13 +588,15 @@ bin_set(char *nam, char **args, UNUSED(Options ops), UNUSED(int func))
|
||||||
sort = action ? 1 : -1;
|
sort = action ? 1 : -1;
|
||||||
else {
|
else {
|
||||||
if (!(optno = optlookupc(**args)))
|
if (!(optno = optlookupc(**args)))
|
||||||
zwarnnam(nam, "bad option: -%c", **args);
|
zerrnam(nam, "bad option: -%c", **args);
|
||||||
else if(dosetopt(optno, action, 0))
|
else if(dosetopt(optno, action, 0))
|
||||||
zwarnnam(nam, "can't change option: -%c", **args);
|
zerrnam(nam, "can't change option: -%c", **args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
args++;
|
args++;
|
||||||
}
|
}
|
||||||
|
if (errflag)
|
||||||
|
return 1;
|
||||||
doneoptions:
|
doneoptions:
|
||||||
inittyptab();
|
inittyptab();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue