larkery / zsh-histdb

A slightly better history for zsh
MIT License
1.25k stars 74 forks source link

Having a .sqliterc file interferse with zsh-histdb #135

Closed CristianCantoro closed 1 year ago

CristianCantoro commented 1 year ago

I have recently added a very simple .sqliterc file:

$ cat ~/.sqliterc
-- sqlite3 preferences
.headers on
.mode column

This causes some issues with zsh-histdb.

When I launch a new shell:

$
-- Loading resources from <home>/.sqliterc
<home>/.oh-my-zsh/custom/plugins/zsh-histdb/histdb-migrate:8: bad math expression: operator expected at `2         ...'
-- Loading resources from /home/Cristian.Consonni/.sqliterc
Error: near line 8: near "5240": syntax error                                                                                                                                                                      

Basically, having headers turned on throws completely off the scripts-

You can add an option to make sure that headers are off for s given sqlite3 command, I am going to open a pull request.

CristianCantoro commented 1 year ago

Never mind, I realized that I was using an older version and this was already fixed, in the exact same way I planned to fix it.