Re: single quote "'" in bash xterm or lxterminal
On Thu, Dec 28, 2023 at 09:15:52AM +0700, Max Nikulin wrote:
> On 26/12/2023 23:57, Mike McClain wrote:
> > Only when xterm_bindings has no executable lines in it does it not
> > kill '"' in an X terminal window.
> > The line that pulled it in was ;
> > [ -n "$DISPLAY" ] && [ -f /mc/bin/xterm_bindings ] && bind -f /mc/bin/xterm_bindings;
>
> I do not see anything that may cause the issue with single quote in the
> following message. I am curious what was the goal of the particular binding
> that had so detrimental side effect.
>
> https://lists.debian.org/msgid-search/20110218064727.GA6305@playground
> Re: xterm question [SOLVED] Thu, 17 Feb 2011 22:47:27 -0800
That message is over 12 years old. It's quite likely some changes have
been made since then.
I'd also be curious to see which line of the /mc/bin/xterm_bindings
file actually caused the issue. I'm guessing it was either a typo,
or a conceptual error in setting up the desired binding.
Background info for those following along:
The bind command (a bash builtin) installs readline key bindings --
in this case, from a file named /mc/bin/xterm_bindings.
Readline normally reads custom key bindings from the ~/.inputrc file.
This is done automatically, and does not need a bind command to be
executed from a dot file.
I have no idea why the OP is using this file in addition to, or instead
of, the ~/.inputrc file.
It's *possible* that the OP wanted different key bindings in bash
compared to other programs that use readline, e.g. gdb. That would
be one reason to keep two separate files. I have no idea why the
second file is kept outside the user's $HOME, though, let alone why
the OP has a directory named /mc, or why bash-specific readline key
bindings are kept there.
I'm also extremely confused why these bindings are only loaded when
bash is run inside an X session (the $DISPLAY check). I don't see
the point of that at all. If anything, a check for $TERM == xterm
might be reasonable (based on the name of the file), but that's not the
check that's being used.
Reply to: