bash -p shows
"x\000": self-insert
May be that this came in by a typo.
In order to repair, a normal bind command
bind "x":self-insert
or
bind '"x":self-insert'
has no effect. Therefore I try to remove the false binding by
bind -r "x\000"
It does effect nothing.
I have tried all variations with quotes and backslashes and $'\x00' and the like ('\0'), e.g.
bind -r "x"'\0'
without succsess.
But this was the solution --,for the first time:
bind -r ' "x" "$(echo -n -e "\x00")" '
For a second equal case this did not work.
The second case was because the normal command
bind '"x":self-insert'
caused again that bash -p shows
"x\000": self-insert
Is there really no unmistakenp way?
=====
== edit 08.12.2022 16:05
Thanks, but I need a way not to close the shell in order not to loose things.
. inputrc or other initiating files are not affected.
With my solution presented in the answer the unwanted binding is removed succsessfully.
The question now is how to make a new correct binding.
Even
bind "$(echo -n -e "\0170")":self-insert
is no wsy. All what I do results in
bash -p shows
"x\000": self-insert
I cannot ask you to help because you do not have such a corrupted shell.
( I do not have the courage to speculate if this is another craziness of bash )
Regards
Anton Wessel
~/.inputrc
or (asbind …
) in~/.bashrc
or so (or in one of their global counterparts in/etc
). In this case you probably want to fix the responsible file rather thanbind -r
in just one shell, becausebind -r
only affects the shell you run it from and does not affect the permanent config.set +o emacs +o vi
.