I am on macOS/darwin using a "default settings" zsh environment (no "oh-my-zsh" or any of that).
Some developer tool I just installed apparently broke some keybinds that I use frequently -- the emacs-style control-a and control-e "beginning-of-line" and "end-of-line" cursor movements. When I type control-a, the
^A token is inserted at the prompt. Only my user account on the system is affected -- a brand new user account on the same system is unaffected, in that the keyboard shortcuts work without any additional configuration.
Comparing the affected and unaffected environments, the output of
bindkey differs. In the affected environment,
bindkey outputs 49 lines, but in the unaffected environment,
bindkey outputs 120 lines. It seems clear to me this is the source of the problem, but not the root cause.
Further investigation: on the affected shell,
$ bindkey -lL returns:
bindkey -N command bindkey -N emacs bindkey -N isearch bindkey -A viins main bindkey -N vicmd bindkey -N viins bindkey -N viopp bindkey -N visual
On the unaffected shell, this is identitcal except that line 4 is:
bindkey -A emacs main
This seems to make sense with the behavior I'm seeing -- the emacs-style binds I am expecting have been replaced with a different style of binds.
I still don't really know how bindkey works, so I am curious if it has some state somewhere on the system that I can inspect, or whether this is happening as the result of shell initialization files. The latter would be confusing, since I am only aware of
~/.zshrc in my user profile that would affect only my shell context, and I believe I have controlled for this already. (Is there any way to list all of the initialization files that were sourced when loading the shell?)
Ultimately I would like to figure out what caused this behavior, so I can submit a bug report to the developer tool I installed that caused the issue.