[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: eval '`' reports error but $? is still 0
From: |
Emanuele Torre |
Subject: |
Re: eval '`' reports error but $? is still 0 |
Date: |
Wed, 10 May 2023 15:46:11 +0200 |
User-agent: |
Mutt/2.2.10 (2023-03-25) |
On Wed, May 10, 2023 at 09:05:20PM +0800, Clark Wang wrote:
> See the following example (with 5.2.15):
>
> bash-5.2$ PS1='$? >> '
> 0 >> eval '`'
> bash: unexpected EOF while looking for matching ``'
> 0 >> <-- press ENTER
> 2 >> <-- now $? is 2
>
>
> It looks like the failed eval '`' is still waiting for some input?
I cannot reproduce this on the devel branch.
It looks like it was fixed by 6711d2dc7793ed3d35e91b2bd4ecbdfccfcf469f
(so between the release of 5.2.2 and 5.2.3), but that fix has not been
officially released as a patch for bash 5.2.
https://git.savannah.gnu.org/cgit/bash.git/commit/?h=devel&id=6711d2dc7793ed3d35e91b2bd4ecbdfccfcf469f
It is caused by the same bug that was causing this other issue:
https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00098.html
emanuele6