Re: COMP_WORDS, namerefs and readonly variables

2017-02-25 Thread Chet Ramey
On 2/24/17 6:39 PM, Grisha Levit wrote: > In bind_comp_words, the readonly attribute is unconditionally removed from > COMP_WORDS, even if that variable is a nameref. This allows unsetting the > readonly attribute on any arbitrary variable. I wonder if the best thing is to just not allow COMP_WOR

COMP_WORDS, namerefs and readonly variables

2017-02-24 Thread Grisha Levit
In bind_comp_words, the readonly attribute is unconditionally removed from COMP_WORDS, even if that variable is a nameref. This allows unsetting the readonly attribute on any arbitrary variable. v = find_variable ("COMP_WORDS"); if (v == 0) v = make_new_array_variable ("COMP_WORDS")