Skip to content

Commit b92438c

Browse files
committed
Use read-only mode for sqlite3 completion
The fix from the previous commit *should* be enough to keep my completion from creating `':memory:'` files, but belt and suspenders, kids. `immutable=1` isn't enough - AFAICT, that just means "don't create WAL/SHM files". You need `mode=ro` to prevent SQLite from creating non-existent database files, even for read-only operations.
1 parent b04f740 commit b92438c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Completion/_sqlite

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function _complete_sqlite() {
5454
fi
5555

5656
db_file=(${~db_file})
57-
db_file="file:$db_file[1]?immutable=1"
57+
db_file="file:$db_file[1]?immutable=1&mode=ro"
5858

5959
compset -q
6060
local -a sql_words

0 commit comments

Comments
 (0)