mirror of
https://github.com/zsh-users/zsh
synced 2024-11-02 09:47:59 +00:00
GLOB_ASSIGN should only affect scalar assignments
This commit is contained in:
parent
6b4d6eaa9b
commit
4dc4e23376
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2015-06-02 Mikael Magnusson <mikachu@gmail.com>
|
||||
|
||||
* 35365: Src/exec.c: GLOB_ASSIGN should only affect scalar
|
||||
assignments, this regressed in 33816.
|
||||
|
||||
2015-06-02 Peter Stephenson <p.stephenson@samsung.com>
|
||||
|
||||
* users/20243: Completion/compinit: turn off GLOB_ASSIGN in
|
||||
|
|
|
@ -2264,14 +2264,14 @@ addvars(Estate state, Wordcode pc, int addflags)
|
|||
state->pc = opc;
|
||||
return;
|
||||
}
|
||||
if (!isstr || (isset(GLOBASSIGN) &&
|
||||
if (!isstr || (isset(GLOBASSIGN) && isstr &&
|
||||
haswilds((char *)getdata(firstnode(vl))))) {
|
||||
globlist(vl, 0);
|
||||
/* Unset the parameter to force it to be recreated
|
||||
* as either scalar or array depending on how many
|
||||
* matches were found for the glob.
|
||||
*/
|
||||
if (isset(GLOBASSIGN))
|
||||
if (isset(GLOBASSIGN) && isstr)
|
||||
unsetparam(name);
|
||||
}
|
||||
if (errflag) {
|
||||
|
|
Loading…
Reference in a new issue