SQLite Forum

SQLite3.exe - How to use arguments AND remain in interactive mode?
Login
# I found the solution which works fine for me and better than before:

I am calling the command line interface (CLI) tool SQLite3.exe now per batch file and added loading of the extension dll into an additional file. The location of the batch file is on the environmental path configuration for me as user.

The command parameter **`-interactive`** does **NOT** make any difference if I supply it or not. As soon as there is at least one SQL command provided the tool will not go into interactive mode but exits after execution:

## D:\\UTL\\sql3.bat

~~~
@D:\UTL\SQLite3.exe -echo -interactive -init D:\UTL\.SQLiteRC %*
~~~

## D:\\UTL\\.SQLiteRC

~~~
.load D:\UTL\SQLite3.dll
.mode box
~~~

## Command line input

~~~
D:\UTL>sql3.bat -version
-- Loading resources from D:\UTL\.SQLiteRC
3.36.0 2021-06-18 18:36:39 5c9a6c06871cb9fe42814af9c039eb6da5427a6ec28f187af7ebfb62eafa66e5

D:\UTL>sql3.bat :memory: "select nv('name1|value1|name2|value2|name3|value3','name2|name1') as result"
-- Loading resources from D:\UTL\.SQLiteRC
select nv('name1|value1|name2|value2|name3|value3','name2|name1') as result
┌───────────────┐
│    result     │
├───────────────┤
│ value2|value1 │
└───────────────┘

D:\UTL>sql3.bat :memory:
-- Loading resources from D:\UTL\.SQLiteRC
SQLite version 3.36.0 2021-06-18 18:36:39
Enter ".help" for usage hints.
sqlite> .exit
.exit

D:\UTL>
~~~

## question

Is this ignorance of the **`-interactive`** command line option intended or is this a buggy behavior?
Where can I find the documentatino of this option?