On Fri, 8 Nov 2024 at 05:19, Chet Ramey <chet.ra...@case.edu> wrote:

> The bind -x execution code could restore the terminal settings to icanon
> mode before executing the command, and then set them back to what readline
> is using (-icanon) before returning. This is not backwards compatible
> and would break all the bind -x bindings that assume the terminal is the
> way readline set it, so I'm not inclined to do it.
>

This would seem to indicate a requirement for two different bind options,
the existing one that assumes the sub-process does not interact with the
terminal (or expects the terminal to be in raw mode), and a new one that
provides a shortcut for "replace the current input buffer and submit it as
if the user had pressed enter".

Then again, one could simply define the function key as ^E^Ufg^J

Perhaps what's really needed is to make sure that "ordinary" commands bound
using bash -x are completely broken (so people won't try to use them),
rather than almost working.

-Martin

Reply via email to