diff options
Diffstat (limited to 'src/shell.c')
-rw-r--r-- | src/shell.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/shell.c b/src/shell.c index 07b1b60b4..503d8a6a8 100644 --- a/src/shell.c +++ b/src/shell.c @@ -1396,6 +1396,7 @@ static char zHelp[] = " If TABLE specified, only list tables matching\n" " LIKE pattern TABLE.\n" ".timeout MS Try opening locked tables for MS milliseconds\n" + ".vfsname ?AUX? Print the name of the VFS stack\n" ".width NUM1 NUM2 ... Set column widths for \"column\" mode\n" ; @@ -2339,6 +2340,18 @@ static int do_meta_command(char *zLine, struct callback_data *p){ sqlite3_libversion(), sqlite3_sourceid()); }else + if( c=='v' && strncmp(azArg[0], "vfsname", n)==0 ){ + const char *zDbName = nArg==2 ? azArg[1] : "main"; + char *zVfsName = 0; + if( p->db ){ + sqlite3_file_control(p->db, zDbName, SQLITE_FCNTL_VFSNAME, &zVfsName); + if( zVfsName ){ + printf("%s\n", zVfsName); + sqlite3_free(zVfsName); + } + } + }else + if( c=='w' && strncmp(azArg[0], "width", n)==0 && nArg>1 ){ int j; assert( nArg<=ArraySize(azArg) ); |