Re: $* vs ${ARRAY[*]} differences in some parameter expansions

2017-02-25 Thread Chet Ramey
On 2/24/17 5:59 PM, Grisha Levit wrote: > bash currently handles all parameter expansions with $* and $@ as described > in interpretation 888, and the behavior when using an array subscripted > with @ matches identically the behavior of the examples concerning $@. > However, the behavior when usin

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

Re: COMPREPLY as a nameref to a readonly associative array

2017-02-25 Thread Chet Ramey
On 2/24/17 6:57 PM, Grisha Levit wrote: > It's possible to change any readonly associative array to the indexed > array (''): Thanks for the report. It really is possible to do a lot of dumb things if you try hard enough. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer

Re: $* vs ${ARRAY[*]} differences in some parameter expansions

2017-02-25 Thread Chet Ramey
On 2/25/17 2:40 PM, Grisha Levit wrote: > Sorry, the behavior in the third example no longer differs with the > latest devel build since the behavior of ${var-$*} has changed. I reverted that, assuming that Martijn will initiate another austin group discussion. -- ``The lyf so short, the craft s

Re: $* vs ${ARRAY[*]} differences in some parameter expansions

2017-02-25 Thread Grisha Levit
Sorry, the behavior in the third example no longer differs with the latest devel build since the behavior of ${var-$*} has changed.