On 4/8/17 11:26 PM, Grisha Levit wrote:
> $ x='\001\177'; printf %q ${x@E}
> $'\001\001\001\177'
>
> Probably just needs:
>
> --- a/subst.c
> +++ b/subst.c
> @@ -7253,7 +7253,7 @@ string_transform (xc, v, s)
> break;
> /* Transformations that modify the variable's value */
> case 'E':
> - ret = ansiexpand (s, 0, strlen (s), (int *)0);
> + ret = dequote_escapes(ansiexpand (s, 0, strlen (s), (int *)0));
> break;
> case 'P':
> ret = decode_prompt_string (s);
Thanks for the report. The patch is just about right, but introduces a
memory leak.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/