Issues accessing Node.js command history in Emacs ansi-term

64 Views Asked by At

I would like to run Node (or Nodejs) interpreter in an Emacs ansi-term buffer. I found this problem: I can not access the common readline command history through ArrowUp and ArrowDown.

When I press ArrowUp and ArrowDown, instead of the expected previus commands, I get the sequences: ^[OA and ^[OB.

Have you any idea of how to fix this ?

Thank you, Nicola Mingotti

1

There are 1 best solutions below

1
elethan On

It sounds like you might be in the line mode of ansi-term (although in this case I would think you would move the cursor up a line rather than displaying the escape squence...). Try using C-c C-k to switch to char. You should be able to go through command history with the arrows as usual. Use C-c C-j to go back to line mode.