/ Check-in [aac8f1df]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix the ".help -all" option in the command-line shell.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: aac8f1dff0728c629b5cbf30369ee91c5862a707ede694dc2628d1d4f5a6c202
User & Date: drh 2018-10-06 14:38:17
Context
2018-10-08
12:58
Add the geopoly_reverse() function to the GeoPoly extension. check-in: 690dd18a user: drh tags: trunk
2018-10-06
14:38
Fix the ".help -all" option in the command-line shell. check-in: aac8f1df user: drh tags: trunk
13:46
Add test cases and assert() statements to ensure that the authorizer is being called as expected from within ALTER TABLE. check-in: ff10d2c7 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/shell.c.in.

  3505   3505   **
  3506   3506   ** Return the number of matches.
  3507   3507   */
  3508   3508   static int showHelp(FILE *out, const char *zPattern){
  3509   3509     int i, j;
  3510   3510     int n = 0;
  3511   3511     char *zPat;
  3512         -  if( zPattern==0 || zPattern[0]=='0' ){
         3512  +  if( zPattern==0
         3513  +   || zPattern[0]=='0'
         3514  +   || strcmp(zPattern,"-a")==0
         3515  +   || strcmp(zPattern,"-all")==0
         3516  +  ){
  3513   3517       /* Show all commands, but only one line per command */
         3518  +    if( zPattern==0 ) zPattern = "";
  3514   3519       for(i=0; i<ArraySize(azHelp); i++){
  3515         -      if( azHelp[i][0]=='.' ){
         3520  +      if( azHelp[i][0]=='.' || zPattern[0] ){
  3516   3521           utf8_printf(out, "%s\n", azHelp[i]);
  3517   3522           n++;
  3518   3523         }
  3519   3524       }
  3520   3525     }else{
  3521   3526       /* Look for commands that for which zPattern is an exact prefix */
  3522   3527       zPat = sqlite3_mprintf(".%s*", zPattern);