diff options
| author | Cy Schubert <cy@FreeBSD.org> | 2026-05-25 17:05:16 +0000 |
|---|---|---|
| committer | Cy Schubert <cy@FreeBSD.org> | 2026-05-25 17:05:16 +0000 |
| commit | b00eb376e3fb28e738f9370552dae9d92c1fdd76 (patch) | |
| tree | 4675a4ad76d8d7d5746413670e0e86f84e968a39 /sqlite3.1 | |
| parent | e7e917ee3cf2b3010b1c511c6ebaf8b65b983ad7 (diff) | |
Diffstat (limited to 'sqlite3.1')
| -rw-r--r-- | sqlite3.1 | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/sqlite3.1 b/sqlite3.1 index 08b1ff262b66..e4ba5a0cb88d 100644 --- a/sqlite3.1 +++ b/sqlite3.1 @@ -137,17 +137,37 @@ continue prompt = " ...> " .sp .fi -o If the file +o If the environment variable XDG_CONFIG_HOME is set then .B ${XDG_CONFIG_HOME}/sqlite3/sqliterc -or +is checked, else +.B ~/.config/sqlite3/sqliterc +is checked. If the selected file does not exist then the fallback of .B ~/.sqliterc -exists, the first of those to be found is processed during startup. -It should generally only contain meta-commands. +is used. It should generally only contain meta-commands. o If the -init option is present, the specified file is processed. o All other command line options are processed. +.SH HISTORY FILE +.B sqlite3 +may be configured to use a history file to save SQL statements and +meta-commands entered interactively. These statements and commands can be +retrieved, edited and, reused at the main and continue prompts. If the +environment variable +.B SQLITE_HISTORY +is set, it will be used as the name of the history file, whether it +already exists or not. If it is not set but the XDG_STATE_HOME +environment variable is then +.B ${XDG_STATE_HOME}/sqlite_history +is used. If XDG_STATE_HOME is not set then +.B ~/.local/state/sqlite_history +is used. If the selected file does not exist then +.B ~/.sqlite_history +will be used as the history file. If any history file is found, it +will be written if the shell exits interactive mode normally, +regardless of whether it existed previously, though saving will +silently fail if the history file's directory does not exist. .SH SEE ALSO https://sqlite.org/cli.html .br |
