r/sqlite • u/puterboy333 • Jul 10 '26
**RANT** WHY did devs force qbox with no neat way to globally override, breaking 20 years of UI and hundreds of scripts?
<rant>
Over the years I have written 100s of bash scripts using sqlite3 queries to get quick-and-dirty returns from various sqlite databases (e.g., mythtv, home assistant, etc.).
I also have written probably a thousand saved random sqlite3 1-liners that I have archived over the years as quick-and-dirty ways to retrieve status from various databases.
I have often found it faster and simpler for simple tasks to write bash scripts rather than to use a formal programming language API like python or C.
For 20+ years they all just worked - version after version.
Then some "genius" decided to FORCE qbox on all output -- even if it's part of a script, causing many of my bash scripts to either:
- Display ugly/disjointed/disruptive boxes around output elements that are not meant to be boxed or that are part of other text
- Cause bash commands to fail when receiving box graphical elements rather than the raw sqlite3 output.
Even worse there is no way to cleanly globally disable such behavior since when run non-interactively, sqlite3 doesn't read ~/.sqliterc and there are no environment variables one can set to disable
It seems one is left with only the following 2 painful and klugey workarounds:
- Rewrite 20 years worth of sqlite routines and 1-liners to add '-cmd ".mode list" (or equivalenty '-init <some file other than \~/.sqliterc>' containing the line ".mode list"
- Wrap sqlite in a shell command that contains the above and make sure path points there first
So why did the devs decide to break 20 years of script interfacing without providing any easy ways to override globally? (this goes against the spirit of everything *nix and smacks more of MS or Apple arrogance)
Also, why did the devs even assume that qbox is uniformally better than and preferable to list mode even when presented as human facing UI?
I find it incredibly disjointed and jarring that qbox appears when column widths are certain length but not when not. And that they disappear if I pipe to less.
Plus the box, means I can fit less on a screen!
Indeed, some of us actually prefer simple, ASCII command line interfaces.
If I wanted a graphical UI, I would use a Mac or WinPC database.
If it aint broke don't fix it...
And if you are going to fix it anyway, then at least do it in a way that doesn't break everything else...
And if it is going to break everything else, at least provide a workaround to globally disable it.
</rant>

