History not showing (arrow up)

Hi. I’ve just cloned the repo from github and installed swi.
However, in the prompt, when i try to press arrow up to show the history, it does not print the last command but ^[[A (same for arrow down, left and right with different codes).
I’m using SWI-Prolog version 8.1.4-32-g2d20d4e8a-DIRTY on Ubuntu 16.04.
A previous version installed using apt works well.

Seems you didn’t build the packages or you didn’t install the prerequisites. See CMAKE.md for building and http://www.swi-prolog.org/build/Debian.txt for the prerequisites.

You have to install libreadline-dev before building the source code.

After installation, you have to enable readline by adding this in your ~/.swiplrc:

:- set_prolog_flag(readline, readline).

The last step is not needed unless you have both libedit and libreadline packages built and you want libreadline instead of the default libedit.

Fixed, thanks!