On 2/4/15 10:27 AM, Piotr Grzybowski wrote:
>  I think you are right, maybe this one should be considered:
> 
> diff --git a/lib/sh/shquote.c b/lib/sh/shquote.c
> index fff4f81..de05f27 100644
> --- a/lib/sh/shquote.c
> +++ b/lib/sh/shquote.c
> @@ -293,7 +293,7 @@ sh_contains_shell_metas (string)
>         case '(': case ')': case '<': case '>':
>         case '!': case '{': case '}':           /* reserved words */
>         case '*': case '[': case '?': case ']': /* globbing chars */
> -       case '^':
> +       case '^': case '@':
>         case '$': case '`':                     /* expansion chars */
>           return (1);
>         case '~':                               /* tilde expansion */
> 
>  what do you think?

It's a two-line fix, but that's the wrong place.

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/
*** ../bash-4.3-patched/assoc.c	2011-11-05 16:39:05.000000000 -0400
--- assoc.c	2015-02-04 15:28:25.000000000 -0500
***************
*** 437,440 ****
--- 440,445 ----
  	if (sh_contains_shell_metas (tlist->key))
  	  istr = sh_double_quote (tlist->key);
+ 	else if (ALL_ELEMENT_SUB (tlist->key[0]) && tlist->key[1] == '\0')
+ 	  istr = sh_double_quote (tlist->key);	
  	else
  	  istr = tlist->key;	

Reply via email to