Re: [PATCH] Preserve echoctl setting in sh‑mode (lib/sh/shtty.c)
From:
Zeffie
Subject:
Re: [PATCH] Preserve echoctl setting in sh‑mode (lib/sh/shtty.c)
Date:
Mon, 03 Feb 2025 22:24:48 -0500
User-agent:
Roundcube Webmail/1.6.9
Lawrence Velázquez,
To clarify, several points in your response appear to miss the mark on
the core issue of the bug report:
Focus on $BASH_VERSION:
While you argue about testing for $BASH_VERSION, this point isn’t
central to the bug report. The issue is about terminal reinitialization
in sh‑mode (when Bash is invoked via its symlink as "sh") and preserving
the echoctl flag—not about whether the shell reports its version. Your
discussion on this aspect, therefore, doesn’t address the technical
problem at hand.
Relevance to the Bug Report Scenario:
The bug report describes a scenario in which the terminal's echoctl
flag is overridden in sh‑mode, leading to missing visual feedback (e.g.,
"^C" not appearing when CTRL‑C is pressed). Focusing on tests that rely
solely on $BASH_VERSION misses the point. The critical matter is how
terminal attributes are reset when Bash is run in sh‑mode.
Common System Configuration:
Additionally, on many systems, /bin/sh is actually a symlink to dash,
not Bash. For example, on some distributions you might see:
This configuration underscores that tests or assertions based solely
on Bash-specific variables or behaviors are not generally applicable to
the broader ecosystem where /bin/sh may not even be Bash.
In summary, while your testing and analogies may be well intended, they
do not directly address the core issue documented in the bug report. The
focus should remain on the behavior of Bash in sh‑mode—specifically, how
terminal settings like echoctl are handled—rather than on aspects that
are either tangential (such as version reporting).