[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Autocompletion problems with nounset and arrays

From: Siteshwar Vashisht
Subject: Re: Autocompletion problems with nounset and arrays
Date: Thu, 19 May 2016 14:54:18 -0400 (EDT)

----- Original Message -----
> From: "Chet Ramey" <address@hidden>
> To: "Eric Pruitt" <address@hidden>, address@hidden, address@hidden
> Cc: "chet ramey" <address@hidden>
> 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 

# 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 
+        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 

> Chet
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
>                ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

Siteshwar Vashisht

reply via email to

[Prev in Thread] Current Thread [Next in Thread]