4 ms·
Neat, this is much nicer than the stock sqlite3 CLI client! The pager behavior is a bit annoying, actually, since if my SELECT has more columns than can fit on
by CGamesPlay 8y ago
Neat, this is much nicer than the stock sqlite3 CLI client! The pager behavior is a bit annoying, actually, since if my SELECT has more columns than can fit on screen, the pager switches to an alternate screen and when I quit, my results are hidden from me. Is it possible to turn this behavior off?
[append] Off for a specific query, I mean. I think I'd prefer to leave it on by default.
- amjith 8y agoI have a few recommendations for you. We use `less -XRF` by default. You can change this to whatever you want via the config file `~/.config/litecli/config`. Just uncomment the line that says `# pager = "less -SXRF". Adding the `-S` to the list of options will make it much better. It will not wrap long lines but instead it will enable horizontal scrolling (using arrow keys). Check for pager section on this page for some details: https://litecli.com/output/ https://litecli.com/output/ The other option is to set the `auto_vertical_output = True` in the config file. This option will cause results to be displayed vertically if they are too wide for the current window.
- CGamesPlay 8y agoThanks! I didn't even realize there was a documentation section. Looking closer, I probably missed it because it's called "Features" rather than "Documentation". I'll definitely use this for my daily SQLite work!
- blattimwind 8y agoDoesn't seem to support sqlite3 dot commands such as .mode/.separator/.import/.output/.headers... (these are really implemented in sqlite3 CLI and not part of the sqlite library). These are, at least for me, among the main reasons to use the CLI in conjunction with SQLite. (The SQLite CLI is very good for massaging CSV data into the correct shape; as far as I know there is no canonical file extension for CLI scripts, I use .sqs, and the CLI has no parameter to run scripts directly, so you have to start the CLI manually and do .read foo.sqs).
- amjith 8y agoWe don't support all of the special commands but we do support a small subset of them. We support .mode .schema, .table and a few others.
- vram22 8y ago>and the CLI has no parameter to run scripts directly, so you have to start the CLI manually and do .read foo.sqs). It does work, but only sort of. Just did: $ sqlite3 -init select_contact.sql test_sqlite.db -- Loading resources from select_contact.sql Alan|Acre|50|Male|100.0 Betty|Smith|20|Female|200.0 Charlie|Copenhagen|30|Male|400.0 Dorothy|Delhi|80|Female|400.0 Edwin|Bombay|40|Male|100.0 Edwin|Pune|55|Female|110.0 SQLite version 3.8.11 2015-07-27 13:49:41 Enter ".help" for usage hints. sqlite> where select_contact.sql contains "select * from contact;" So it can run a script given as a parameter. But it leaves you in the CLI instead of cleanly exiting. And prints those extra headers, etc. Not very Unix-philosophy-adherent, it seems. Edit: formatting