This is because in bash even after binding is disabled with bind -r it still shows up in bind -X list. This is a known bug.
We currently handle this by blindly taking the first item of the bind -X which usually works fine.
Second issue with bash is that we need to filter using grep to get the right binding from the binding list. Because it's nearly impossible to escape the key sequence we use grep -F which takes the argument as a fixed string. This solves the issue of escaping wild key sequences but we can't grep for begining of the line because all characters are interpreted literally. This is unlikely to cause any issues because key sequences are rather specific character combinations but it's not very robust solution either.
This is because in bash even after binding is disabled with
bind -rit still shows up inbind -Xlist. This is a known bug.We currently handle this by blindly taking the first item of the
bind -Xwhich usually works fine.Second issue with bash is that we need to filter using grep to get the right binding from the binding list. Because it's nearly impossible to escape the key sequence we use
grep -Fwhich takes the argument as a fixed string. This solves the issue of escaping wild key sequences but we can't grep for begining of the line because all characters are interpreted literally. This is unlikely to cause any issues because key sequences are rather specific character combinations but it's not very robust solution either.