diff options
Diffstat (limited to 'src/shell.c')
-rw-r--r-- | src/shell.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/shell.c b/src/shell.c index d8ee2108e..a3c94bf67 100644 --- a/src/shell.c +++ b/src/shell.c @@ -12,7 +12,7 @@ ** This file contains code to implement the "sqlite" command line ** utility for accessing SQLite databases. ** -** $Id: shell.c,v 1.58 2002/06/25 01:09:12 drh Exp $ +** $Id: shell.c,v 1.59 2002/06/25 19:31:18 drh Exp $ */ #include <stdlib.h> #include <string.h> @@ -486,6 +486,7 @@ static char zHelp[] = " \"insert\", \"list\", or \"html\"\n" ".mode insert TABLE Generate SQL insert statements for TABLE\n" ".nullvalue STRING Print STRING instead of nothing for NULL data\n" + ".openaux FILENAME Use FILENAME to hold TEMP tables\n" ".output FILENAME Send output to FILENAME\n" ".output stdout Send output to the screen\n" ".prompt MAIN CONTINUE Replace the standard prompts\n" @@ -702,6 +703,15 @@ static int do_meta_command(char *zLine, sqlite *db, struct callback_data *p){ sprintf(p->nullvalue, "%.*s", (int)ArraySize(p->nullvalue)-1, azArg[1]); }else + if( c=='o' && strncmp(azArg[0], "openaux", n)==0 ){ + char *zErrMsg = 0; + sqlite_open_aux_file(db, nArg>=2 ? azArg[1] : 0, &zErrMsg); + if( zErrMsg ){ + fprintf(stderr,"Error: %s\n", zErrMsg); + free(zErrMsg); + } + }else + if( c=='o' && strncmp(azArg[0], "output", n)==0 && nArg==2 ){ if( p->out!=stdout ){ fclose(p->out); |