Fossil with Commonmark

Check-in [1b0a3cf3b3]
Login

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

Overview
Comment:Add some options to the test-all-help command.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | ross-spellcheck
Files: files | file ages | folders
SHA1:1b0a3cf3b321bfd0935baa861d35865e2ff874c8
User & Date: rberteig 2016-04-02 00:35:58
Context
2016-04-02
00:56
Add new fossil test-all-help command. Spell checked and proof read all help text. Fixed typos. Reworded for clarity in a few places. Cleaned up a few inconsistencies of formatting. No code changes other than the new command. Passes all tests. check-in: 26eef7f84a user: rberteig tags: trunk
00:35
Add some options to the test-all-help command. Closed-Leaf check-in: 1b0a3cf3b3 user: rberteig tags: ross-spellcheck
00:00
Add a plain-text equivalent of the /test-all-help page to the CLI. Complete a first pass for spelling and minor grammar over all command and page help text. check-in: f070ec99ae user: rberteig tags: ross-spellcheck
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/main.c.

1224
1225
1226
1227
1228
1229
1230
1231
1232
1233







1234
1235
1236

















1237
1238
1239

1240
1241
1242
1243
1244
1245
1246
  }
  putchar('\n');
}


/*
** COMMAND: test-all-help
** %fossil test-all-help
**
** Show all help text.  Useful for proof-reading.







*/
void test_all_help_cmd(void){
    int i;

















    fossil_print("All commands and pages:\n\n");
    for(i=0; i<count(aCommand); i++){
        //if( memcmp(aCommand[i].zName, "test", 4)==0 ) continue;

        fossil_print("# %s\n", aCommand[i].zName);
        fossil_print("%s\n\n", aCmdHelp[i].zText);
    }
    fossil_print("---\n");
    version_cmd();
}








|

|
>
>
>
>
>
>
>



>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|

<
>







1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262

1263
1264
1265
1266
1267
1268
1269
1270
  }
  putchar('\n');
}


/*
** COMMAND: test-all-help
** %fossil test-all-help ?OPTIONS?
**
** Show help text for commands and pages.  Useful for proof-reading.
** Defaults to just the CLI commands. Specify --www to see only the web
** pages, or --everything to see both commands and pages.
**
** Options:
**    -e|--everything   Show all commands and pages.
**    -t|--test         Include test- commands
**    -w|--www          Show WWW pages.
*/
void test_all_help_cmd(void){
    int i;
    int mask = CMDFLAG_1ST_TIER | CMDFLAG_2ND_TIER;

    if( find_option("www","w",0) ){
        mask = CMDFLAG_WEBPAGE;
    }
    if( find_option("everything","e",0) ){
        mask = CMDFLAG_1ST_TIER | CMDFLAG_2ND_TIER | CMDFLAG_WEBPAGE;
    }
    if( find_option("test","t",0) ){
        mask |= CMDFLAG_TEST;
    }

    fossil_print("Help text for:\n");
    if( mask & CMDFLAG_1ST_TIER )   fossil_print(" * Commands\n");
    if( mask & CMDFLAG_2ND_TIER )   fossil_print(" * Auxiliary commands\n");
    if( mask & CMDFLAG_TEST )   fossil_print(" * Test commands\n");
    if( mask & CMDFLAG_WEBPAGE )   fossil_print(" * Web pages\n");
    fossil_print("---\n");
    for(i=0; i<count(aCommand); i++){

        if( (aCommand[i].cmdFlags & mask)==0 ) continue;
        fossil_print("# %s\n", aCommand[i].zName);
        fossil_print("%s\n\n", aCmdHelp[i].zText);
    }
    fossil_print("---\n");
    version_cmd();
}