Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Uses of "anonymous functions"
On May 25, 8:29pm, Bart Schaefer wrote:
}
} if (){ emulate -LR zsh; setopt extendedglob;
} [[ $1 = (#b)no([:IDENT:]##) ]] }
} then unsetopt ${match[1]}
} fi
Oops, actualy that doesn't work exactly as written, because there is
no $1 in the nameless scope. I over-simplified a working example.
A local is needed to pass $1 into the anonymous function, and I typo'd
the IDENT class:
local arg="$1"
if (){ emulate -LR zsh; setopt extendedglob;
[[ $arg = (#b)no([[:IDENT:]]##) ]] }
then unsetopt ${match[1]}
fi
Sorry about that.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author