----- Original Message ----- > From: "Chet Ramey" <chet.ra...@case.edu> > To: "Eric Pruitt" <eric.pru...@gmail.com>, bug-bash@gnu.org, > b...@packages.debian.org > Cc: "chet ramey" <chet.ra...@case.edu> > Sent: Tuesday, April 26, 2016 11:24:12 PM > Subject: Re: Autocompletion problems with nounset and arrays > > Thanks for the report. I will fix this before bash-4.4 is released.
I have built bash from devel branch and I am still able to reproduce this bug. Also, this bug is reproducible if I try to complete path names instead of arrays. # ls /home/situ/Des<TAB>bash: !ref: unbound variable I can only relate one change from devel branch with this bug, however it does not handle all the cases : @@ -3140,7 +3147,12 @@ bash_filename_stat_hook (dirname) if (should_expand_dirname) { new_dirname = savestring (local_dirname); + /* no error messages, and expand_prompt_string doesn't longjmp so we don't + have to worry about restoring this setting. */ + global_nounset = unbound_vars_is_error; + unbound_vars_is_error = 0; wl = expand_prompt_string (new_dirname, 0, W_NOCOMSUB); /* does the right thing */ + unbound_vars_is_error = global_nounset; if (wl) nounset should be turned off for all completions and not just for one specific case. > > Chet > > -- > ``The lyf so short, the craft so long to lerne.'' - Chaucer > ``Ars longa, vita brevis'' - Hippocrates > Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/ > -- -- Siteshwar Vashisht