1

confessing, this is not ubuntu-specific, but SQLite shell-specific. Anyway, maybe one of you out there know some hint. I'm a Linux starter btw...

I'm typing with SQLite and using its shell, accidentally typing the up arrow key. unfortunately there is no history readline functionality linked with it, and no, i can't change that. The shell input is waiting for some end line identified, but probably is in some special escaped-mode.... so my shell session is to perish by me pressing Ctrl+Z. Any other key I tried did not change a thing.

Does anyone have a hint? Can that behaviour be changed so that when pressing those "special"keys of a standard keyboard just happen to do nothing?

2 Answers 2

1

if Ctrl+Z is not working then you can use the command:-

sqlite> .exit

For more information use :-

sqlite> .help
0

Apparently, this behaviour is known and "intentional". It behaves like this because sqlite developers don't want to make sqlite dependent on readline (the library that gives the arrow functionality to the shell) because it isn't in all GNU/Linux distributions. And, therefore, they don't distribute the binary including the readline features.

In order to have a more standard sqlite shell, you will have to build sqlite from source. It isn't that difficult, simply run these commands inside a temporal directory:
apt-get source sqlite3 cd sqlite3-* ./configure make sudo make install
After that, you should be able to enter in the your own-built version just typing sqlite3.

More info here.


As for the "exiting command", Ctrl + Z actually pauses the program being run and sends it in background. If you want to exit from sqlite shell you should use Ctrl + D

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .