0

My enter key suddenly started triggering a history-search-backward action instead of running the typed command in python and bash shells, although it still behaves correctly on my zsh (default) terminal. So far I have to use the Ctrl+j key as a workaround.

I tried running stty sane as suggested here (Pressing enter produces ^M instead of a newline) with no success and double-checked my shortcuts / bindkeys/ aliases without finding anything relevant..

Any help greatly appreciated!

  • The fact the zsh uses its own line editing module (zle) whereas AFAIK both bash and the python interpreters use readline definitely suggests it's an issue with your readline configuration. How exactly did you double-check bind keys? – steeldriver May 03 '21 at 12:43
  • I checked the custom bindkeys I have defined on my .zshrc: none of them seemed to overload the return key – Yann Mentha May 04 '21 at 09:53
  • It turns out that I did not check thoroughly enough: it wasnt the bindkeys in my .zshrc who were causing it, but some old bindings in my .inputrc. Thanks for the help! – Yann Mentha May 04 '21 at 13:40
  • It might be helpful to future readers to add your findings as an answer (in particular, what `.inputrc` binding caused the issue) – steeldriver May 04 '21 at 13:42

1 Answers1

0

The problem was caused by my ~/.inputrc that I hadn't checked: I had accidentally mapped the return key to a history-search-backward action: removing the line in question solved the issue