Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] Fix command executions w/ shadowing array parameter with ksharray set



Thanks, I can confirm the bug.

On Dec 27,  1:45pm, Takeshi Banse wrote:
}
} +++ b/Src/exec.c
} @@ -2294,6 +2294,8 @@ addvars(Estate state, Wordcode pc, int addflags)
}  		}
}  		allexp = opts[ALLEXPORT];
}  		opts[ALLEXPORT] = 1;
} +		if (unset(KSHARRAYS))
} +		    unsetparam(name);
}  	    	pm = assignsparam(name, val, myflags);
}  		opts[ALLEXPORT] = allexp;
}  	    } else

That needs to be isset(KSHARRAYS) rather than unset(), I think?

} diff --git a/Test/A06assign.ztst b/Test/A06assign.ztst
} + A="${A[*]}" printenv A

I'm not sure we can rely on "printenv" being available as a command at
test time.  Can anyone suggest a good alternative?  /bin/sh -c 'echo $A'
perhaps?



Messages sorted by: Reverse Date, Date, Thread, Author