In Debian, the arrow keys do not work in the sqlite3 shell by default. For example arrow up-down doesn’t work to browse the command history, and arrow left-right doesn’t work to edit the current command line.

This is intentional, according to this conversation:

The reason: the command line editing features are an external dependency, and so the maintainers of the sqlite3 binary package have decided not to make assumptions about the available external libraries, and by default do not make references to them, otherwise the binary could be unusable.

To enable the command line editing features, you have to build sqlite3 from source. During the build, the available command line editing libraries are automatically detected and enabled, if any.

`apt-get source sqlite3
cd sqlite3-3.7.13
make install

If after this the arrow keys are still not working, that must be because you don’t have any command line editing libraries in your system.

blog comments powered by Disqus