Update the .help screen in the CLI. Make sure the temporary files for

".open" are not deleted too soon.

FossilOrigin-Name: b8d92d8dc239597c6f01a6e572b047f98ce374a8f48257683fa839dde3ec993f
This commit is contained in:
drh 2018-01-11 00:38:39 +00:00
parent 9791313474
commit 536c345107
3 changed files with 14 additions and 9 deletions

View File

@ -1,5 +1,5 @@
C Add\sthe\sbuilt-in\sedit(VALUE)\sand\sedit(VALUE,EDITOR)\sfunction\sto\sthe\sCLI.
D 2018-01-11T00:04:00.842
C Update\sthe\s.help\sscreen\sin\sthe\sCLI.\s\sMake\ssure\sthe\stemporary\sfiles\sfor\n".open"\sare\snot\sdeleted\stoo\ssoon.
D 2018-01-11T00:38:39.192
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F Makefile.in 38f84f301cbef443b2d269f67a74b8cc536469831f70df7c3e912acc04932cc2
@ -484,7 +484,7 @@ F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384
F src/resolve.c bbee7e31d369a18a2f4836644769882e9c5d40ef4a3af911db06410b65cb3730
F src/rowset.c 7b7e7e479212e65b723bf40128c7b36dc5afdfac
F src/select.c 8b22abe193e4d8243befa2038e4ae2405802fed1c446e5e502d11f652e09ba74
F src/shell.c.in 52aef9f2f61915c9226d6ff87444102b744a48e7b001e50d88d262fed3526030
F src/shell.c.in b87abffd0db09203ad8a133d56fe8f154ace5ec0a14197a153fb7d80b1438c01
F src/sqlite.h.in 1f1a2da222ec57465794e8984d77f32d0bd0da80cdc136beadda461a0be9d80c
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
F src/sqlite3ext.h c02d628cca67f3889c689d82d25c3eb45e2c155db08e4c6089b5840d64687d34
@ -1697,7 +1697,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P a6ed5ab9bc9741267fd1207e63b4c49d074291085c7e3f25e9f62a82f916a656
R 178e506824f095711305ed729320460e
P ef823c47a0ac4f3b001e6c89c38354b45b5229d872cfc69a29c82e99414b89c8
R 3f7dbb61aadad578b23395ee859b8a4c
U drh
Z c1ee7e4e075a7abb60497a235dd7f461
Z c33398289b510440ef343bbf6c1308f4

View File

@ -1 +1 @@
ef823c47a0ac4f3b001e6c89c38354b45b5229d872cfc69a29c82e99414b89c8
b8d92d8dc239597c6f01a6e572b047f98ce374a8f48257683fa839dde3ec993f

View File

@ -3247,10 +3247,12 @@ static char zHelp[] =
" tabs Tab-separated values\n"
" tcl TCL list elements\n"
".nullvalue STRING Use STRING in place of NULL values\n"
".once FILENAME Output for the next SQL command only to FILENAME\n"
".once (-e|-x|FILE) Output for the next SQL command only to FILE\n"
" or invoke system text editor (-e) or spreadsheet (-x)\n"
" on the output.\n"
".open ?OPTIONS? ?FILE? Close existing database and reopen FILE\n"
" The --new option starts with an empty file\n"
".output ?FILENAME? Send output to FILENAME or stdout\n"
".output ?FILE? Send output to FILE or stdout\n"
".print STRING... Print literal STRING\n"
".prompt MAIN CONTINUE Replace the standard prompts\n"
".quit Exit this program\n"
@ -4371,6 +4373,7 @@ int shellDeleteFile(const char *zFilename){
*/
static void clearTempFile(ShellState *p){
if( p->zTempFile==0 ) return;
if( p->doXdgOpen ) return;
if( shellDeleteFile(p->zTempFile) ) return;
sqlite3_free(p->zTempFile);
p->zTempFile = 0;
@ -8413,6 +8416,8 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){
}
sqlite3_free(data.zFreeOnClose);
find_home_dir(1);
output_reset(&data);
data.doXdgOpen = 0;
clearTempFile(&data);
#if !SQLITE_SHELL_IS_UTF8
for(i=0; i<argc; i++) sqlite3_free(argv[i]);