]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Improved built-in help in the command-line shell. Enable the
authordrh <drh@noemail.net>
Tue, 29 Aug 2006 12:04:19 +0000 (12:04 +0000)
committerdrh <drh@noemail.net>
Tue, 29 Aug 2006 12:04:19 +0000 (12:04 +0000)
fulltext search extension in the TCL interface. (CVS 3372)

FossilOrigin-Name: 9763b4bfd5f0579f9fb821899ffa8bfe650054d7

manifest
manifest.uuid
src/shell.c
src/tclsqlite.c

index 15b26e5db287f26b329760c971931b298617435a..496f58aa63f06810ae0611a95509875035a448b1 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Make\sstatic\ssome\ssymbols\swhich\sshouldn't\shave\sbeen\sexported.\s(CVS\s3371)
-D 2006-08-28T23:46:02
+C Improved\sbuilt-in\shelp\sin\sthe\scommand-line\sshell.\s\sEnable\sthe\nfulltext\ssearch\sextension\sin\sthe\sTCL\sinterface.\s(CVS\s3372)
+D 2006-08-29T12:04:19
 F Makefile.in 8e7f9ecebab2c6e0f3db20ff129a8f9405ab64f8
 F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -79,12 +79,12 @@ F src/printf.c b179b6ed12f793e028dd169e2e2e2b2a37eedc63
 F src/random.c d40f8d356cecbd351ccfab6eaedd7ec1b54f5261
 F src/select.c 0d4724930a1f34c747105ed1802fa4af0d8eb519
 F src/server.c 087b92a39d883e3fa113cae259d64e4c7438bc96
-F src/shell.c bc41feffb59676885368b7be5104e7d65ddb55d3
+F src/shell.c 3496a1b0a23a6b77f90231b9e2f521fd93dcb5b1
 F src/sqlite.h.in 84ac26ca94a84dd603fb57a27d862f51bfd9f687
 F src/sqlite3ext.h 11a046b3519c4b9b7709e6d6a95c3a36366f684a
 F src/sqliteInt.h 325a2d45be2b22c1e21ad649e0a898c74eaec7de
 F src/table.c d8817f43a6c6bf139487db161760b9e1e02da3f1
-F src/tclsqlite.c 4e97383988f6349b01f11b55946536a46e247aa3
+F src/tclsqlite.c a29488f25daecd397850d78525fe01422024963b
 F src/test1.c 535294d7f21a4127082c4f7a57f225482df9cc36
 F src/test2.c ca74a1d8aeb7d9606e8f6b762c5daf85c1a3f92b
 F src/test3.c 85135c09560c48bdb0a23c9b890ab405486b8ec9
@@ -388,7 +388,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
-P ca850d3d80f67672172d11392fcdf60bfbb94c02
-R f983b00fc1cd0fd5bcd1ed5dd6fe41c1
-U shess
-Z a627c5db236e5e7e63a2a59bb168ce0e
+P 58006e38af760b53cf72bf127d7c7b8a619a1282
+R 29f7ed7a0d966745a2c83716a5630c77
+U drh
+Z 1df6398b1b50a7becef0bc2a58ad5ecd
index d075c2742f5330beb5a0bbcf432fa2d461217a6b..ea369234854099e02e0df588dba09cfa8cdfce1d 100644 (file)
@@ -1 +1 @@
-58006e38af760b53cf72bf127d7c7b8a619a1282
\ No newline at end of file
+9763b4bfd5f0579f9fb821899ffa8bfe650054d7
\ No newline at end of file
index 0dbd157ef80ca4a3fd49c51cb9df2f65505b339a..cfa2e981e16f7b0e7bccbcc5700367a8fa771454 100644 (file)
@@ -12,7 +12,7 @@
 ** This file contains code to implement the "sqlite" command line
 ** utility for accessing SQLite databases.
 **
-** $Id: shell.c,v 1.146 2006/08/19 11:15:20 drh Exp $
+** $Id: shell.c,v 1.147 2006/08/29 12:04:19 drh Exp $
 */
 #include <stdlib.h>
 #include <string.h>
@@ -1653,12 +1653,14 @@ static const char zOptions[] =
   "   -separator 'x'       set output field separator (|)\n"
   "   -nullvalue 'text'    set text string for NULL values\n"
   "   -version             show SQLite version\n"
-  "   -help                show this text, also show dot-commands\n"
 ;
 static void usage(int showDetail){
-  fprintf(stderr, "Usage: %s [OPTIONS] FILENAME [SQL]\n", Argv0);
+  fprintf(stderr,
+      "Usage: %s [OPTIONS] FILENAME [SQL]\n"  
+      "FILENAME is the name of an SQLite database. A new database is created\n"
+      "if the file does not previously exist.\n", Argv0);
   if( showDetail ){
-    fprintf(stderr, "Options are:\n%s", zOptions);
+    fprintf(stderr, "OPTIONS include:\n%s", zOptions);
   }else{
     fprintf(stderr, "Use the -help option for additional information\n");
   }
@@ -1782,7 +1784,7 @@ int main(int argc, char **argv){
     }else if( strcmp(z,"-version")==0 ){
       printf("%s\n", sqlite3_libversion());
       return 0;
-    }else if( strcmp(z,"-help")==0 ){
+    }else if( strcmp(z,"-help")==0 || strcmp(z, "--help")==0 ){
       usage(1);
     }else{
       fprintf(stderr,"%s: unknown option: %s\n", Argv0, z);
index 6222083786023c688154f212476e36bf3d30da50..0de5a6fd323a1cdf0ab89c28f4a447613343cd24 100644 (file)
@@ -11,7 +11,7 @@
 *************************************************************************
 ** A TCL Interface to SQLite
 **
-** $Id: tclsqlite.c,v 1.170 2006/08/25 23:42:53 drh Exp $
+** $Id: tclsqlite.c,v 1.171 2006/08/29 12:04:19 drh Exp $
 */
 #ifndef NO_TCL     /* Omit this whole file if TCL is unavailable */
 
@@ -2073,6 +2073,13 @@ static int DbMain(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
   zArg = Tcl_GetStringFromObj(objv[1], 0);
   Tcl_CreateObjCommand(interp, zArg, DbObjCmd, (char*)p, DbDeleteCmd);
 
+#ifdef SQLITE_ENABLE_FTS1
+  {
+    extern int fulltext_init(sqlite3*);
+    fulltext_init(p->db);
+  }
+#endif
+
   /* If compiled with SQLITE_TEST turned on, then register the "md5sum"
   ** SQL function.
   */