1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-18 15:21:16 +02:00

18325: options on by default weren't printed correctly by zsh/parameter

This commit is contained in:
Peter Stephenson 2003-03-07 12:31:44 +00:00
parent 79d0de7c3a
commit 1c9ac56c43
3 changed files with 13 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2003-03-07 Peter Stephenson <pws@csr.com>
* 18325: Src/Modules/parameter.c: options on by default weren't
handled correctly.
2003-02-26 Clint Adams <clint@zsh.org>
* 18303: zshconfig.ac: fix some always-true test evaluations.

View file

@ -794,7 +794,14 @@ getpmoption(HashTable ht, char *name)
pm->level = 0;
if ((n = optlookup(name)))
pm->u.str = dupstring(opts[n] ? "on" : "off");
{
int ison;
if (n > 0)
ison = opts[n];
else
ison = !opts[-n];
pm->u.str = dupstring(ison ? "on" : "off");
}
else {
pm->u.str = dupstring("");
pm->flags |= PM_UNSET;

View file

@ -347,8 +347,6 @@ scantermcap(HashTable ht, ScanFunc func, int flags)
u = buf;
pm->flags = PM_READONLY | PM_SCALAR;
pm->sets.cfn = NULL;
pm->gets.cfn = strgetfn;
for (capcode = (char **)boolcodes; *capcode; capcode++) {
if ((num = ztgetflag(*capcode)) != -1) {