Re: [PATCH] Preserve echoctl setting in sh‑mode (lib/sh/shtty.c)
From:
Greg Wooledge
Subject:
Re: [PATCH] Preserve echoctl setting in sh‑mode (lib/sh/shtty.c)
Date:
Mon, 3 Feb 2025 18:11:30 -0500
User-agent:
Mutt/1.10.1 (2018-07-13)
On Mon, Feb 03, 2025 at 17:43:38 -0500, Zeffie via Bug reports for the GNU
Bourne Again SHell wrote:
> 1. `echo $BASH_VERSION` is Irrelevant
> You seem to have completely misunderstood the context of the bug report. The
> command:
>
> ```sh
> echo $BASH_VERSION
> ```
> is entirely irrelevant in this discussion because:
> `BASH_VERSION` is only set when Bash is running as Bash.
>
> When Bash is invoked as `sh` (i.e., in sh-mode via symlink), it does not
> necessarily set `BASH_VERSION` and behaves differently from its normal
> interactive mode.
>
> The issue being reported occurs specifically in sh-mode, which means that
> confirming `BASH_VERSION` only proves that you’re not testing the relevant
> scenario.
>
> Your test confirms that you are running Bash in normal mode, not in sh-mode.
> That is the opposite of what is required to reproduce the issue.
hobbit:~$ (exec -a sh bash)
sh-5.2$ echo "$BASH_VERSION"
5.2.15(1)-release