larkery / zsh-histdb

A slightly better history for zsh
MIT License
1.27k stars 75 forks source link

Use where="1" so that it can support lower version of sqlite3. #61

Closed tru2dagame closed 4 years ago

tru2dagame commented 4 years ago

I tried to install this plugin on my vm. Found an error with Error: no such column: true. image

Spend quite a few time on this issue. Turns out it's quite easy. The sqlite3 version need to be > 3.23.0.

https://stackoverflow.com/questions/2510652/is-there-a-boolean-literal-in-sqlite

I think it is necessary to add it to the readme, help people like me to save some time.

samcv commented 4 years ago

There is no need to do this. We can just fix the original issue. Replace true with 1 and it will work even on older versions.

samcv commented 4 years ago

To be specific, the line local where="true" needs to be changed to local where="1"

tru2dagame commented 4 years ago

@samcv Thanks for the advice. I updated the changes.

samcv commented 4 years ago

Perfect. I think this is ready to be merged now. Not sure if @larkery is around and can merge this? ATM I have this patched because many servers I login have an old version of sqlite3. Hopefully this can get merged.

larkery commented 4 years ago

This seems entirely reasonable