On 21/05/2019 23:33, Dennis Williamson wrote:
Why don't you unbind the keystrokes that are actually bound?
while read -r b; do bind -r "$b"; done < <(bind -p | awk -F ':' '/./
&& !/self-insert|accept-line|^#/ {gsub("\"", "", $1); print $1}')
That was my first approach when I dealt with this some years ago.
On my system, that takes 0.011 seconds to run and it's not iterating
through a bunch of key sequences that aren't there.
It does seem to leave behind a few, some of which match cchars (control
Here too. So I tried other methods.
As an alternative, just put all the (un)bindings in ~/.inputrc, for example:
"\C-s": ""
To automate that:
bind -p | awk -F ':' '/./ && !/self-insert|accept-line|^#/ {print $1 ":
\"\""}' >> ~/.inputrc
I tried that, too. But this also left some bindings behind.
Frankly, I'd have to dislike key bindings A LOT to go to the trouble of
doing all this unbinding.
Yes. And I need several combinations for other purposes.
But I can not remove bindings with key-sequences my terminal does not
produce like \eO[ABCDFH]
That seems to be wrong. Currently, the script works perfectly and the
time is acceptable.
What still remains is the not working assignment of ^X.
This inquiry would have been better suited for help-bash rather than
bug-bash.
Hmm. Yes (except for ^X)
Henning