Up-arrow at swipl query prompt just echoes ^[[A

I’m using: SWI-Prolog version "(threaded, 64 bits, version 8.4.2) "

Instead of seeing previous queries recalled, a student of mine using swipl on Linux via Konsole just sees ^[[A echo when he hits up-arrow at the query prompt. It looks like this:

?- ^[[A^[[A^[[A

Did they build from source? What Linux distro? Sounds like a missing readline library but how to fix depends on how it was installed.

1 Like

Installed with
$ apt install swi-prolog-core

Linux distro Kubuntu 22.04

Fixed by removing swi-prolog-core and running:

% sudo apt-add-repository ppa:swi-prolog/stable
% sudo apt-get update
% sudo apt-get install swi-prolog
1 Like

Possibly Kubuntu chopped up Prolog into even more pieces or the package is incomplete. The normal distribution comes with command line editors based on GNU libreadline and BSD libedit. In some Linux packages these may not be part of the -core package though.

Everybody: Thanks so much!