[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Define $as_echo and $as_echo_n for backward compatibility.
From: |
Zack Weinberg |
Subject: |
Re: [PATCH] Define $as_echo and $as_echo_n for backward compatibility. |
Date: |
Fri, 13 Mar 2020 15:22:36 -0400 |
On Fri, Mar 13, 2020 at 3:13 PM Eric Blake <address@hidden> wrote:
>
> Unpatched bash 5.0 has a bug where calling $as_echo that contains \ can
> result in unintended globbing, where the behavior of the expansion is
> dependent on the contents of the current directory. Nasty!
Yikes! And not just unpatched 5.0.0, either...
$ bash --version
GNU bash, version 5.0.16(1)-release (x86_64-pc-linux-gnu)
$ touch %sn; bash -c 'cmd='\''printf %s\n'\''; $cmd test'
testn$
I don't see any practical workaround and I surely hope this gets fixed
*properly* soon in bash (that discussion you linked to doesn't seem
terribly promising, though).
> But I don't
> see a problem in providing the variable definition for back-compat
> reasons (that is, bash's bug doesn't affect this patch)
Makes sense. Pushed. Thanks for reviewing.
zw