-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 04/08/2011 02:40 PM, Edzard Pasma wrote: > Just found that the APSW shell does tabcomplete (and even for > tablenames). It is described here: > > http://apidoc.apsw.googlecode.com/hg/shell.html
(I'm the APSW author). It also does output colouring. Makes it a lot easier to distinguish numbers from strings of digits etc. I'd also submit that the .dump output is a thing of beauty :-) It also completes database names, column names, builtin SQLite function names, collations, etc(*). However the completion is not context sensitive (ie using a grammar) so it is really just completing a sequence of independent words. This is just fine most of the time and in many cases almost any word is allowable at almost any point anyway. I did look into trying to hack the grammar (which really is a bunch of grammar rules interspersed with C code) or using the railroad diagram input in order to make a SQLite SQL parser. In the case of completion that is even more difficult since it would have to tolerate an incomplete string. Maybe one day... Pragmas are also completed and they are context dependent so if you do "pragma journal_mode =<TAB>" it will show the journal modes available. Unfortunately I do have hard coded tables of many things since it isn't possible to find them by asking SQLite at runtime. Some such as the list of registered functions and how many arguments they take can only be provided by code changes to SQLite itself. It would be nice if there were virtual tables allowing dynamic introspection of SQLite. (*) In a fit of OCD it even pays attention to what case you are using and does completions in the same case even if you mix cases in the same word! Roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2gs3kACgkQmOOfHg372QS18QCeIKqTyHGTHdTknVoqoEteO+F5 KHYAni17eEPBwxFF6cte+OkgA6M8WmHo =4Ia7 -----END PGP SIGNATURE----- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users