Fossil SCM

Disable the new "fossil apropos" command. It is of limited usefulness. The "fossil search -h" command does exactly the same thing. And it pollutes the command namespace.

drh 2025-03-01 10:07 trunk
Commit 638c98d360ce4a47db74390e299349f57be173dd34ea30916da2bfad80e485f9
1 file changed +9 -7
+9 -7
--- src/dispatch.c
+++ src/dispatch.c
@@ -1298,12 +1298,13 @@
12981298
*/
12991299
void usage_cmd(void){
13001300
help_cmd();
13011301
}
13021302
1303
+#if 0
13031304
/*
1304
-** COMMAND: apropos
1305
+** off-COMMAND: apropos
13051306
**
13061307
** Usage: %fossil apropos KEYWORD ...
13071308
**
13081309
** Search the built-in help pages for Fossil for topics that
13091310
** match the KEYWORD(s)
@@ -1318,10 +1319,11 @@
13181319
g.argc++;
13191320
azNewArgv[g.argc] = 0;
13201321
g.argv = azNewArgv;
13211322
search_cmd();
13221323
}
1324
+#endif
13231325
13241326
/*
13251327
** COMMAND: help
13261328
**
13271329
** Usage: %fossil help [OPTIONS] [TOPIC] [SUBCOMMAND|options|PATTERN]
@@ -1429,11 +1431,11 @@
14291431
"Usage: %s help TOPIC\n"
14301432
"Things to try:\n\n"
14311433
" %s help help\n"
14321434
" %s help options\n"
14331435
" %s help -a\n"
1434
- " %s apropos TOPIC\n\n"
1436
+ " %s search -h TOPIC\n\n"
14351437
"Other common values for TOPIC:\n\n",
14361438
z, z, z, z, z);
14371439
command_list(CMDFLAG_1ST_TIER,verboseFlag,useHtml);
14381440
if( !verboseFlag ) version_cmd();
14391441
return;
@@ -1467,15 +1469,15 @@
14671469
n = dispatch_approx_match(g.argv[2], 5, az);
14681470
for(i=0; i<n; i++){
14691471
fossil_print(" * %s\n", az[i]);
14701472
}
14711473
fossil_print("Other commands to try:\n");
1472
- fossil_print(" fossil apropos PATTERN ;# search all help text\n");
1473
- fossil_print(" fossil help -a ;# show all commands\n");
1474
- fossil_print(" fossil help -w ;# show all web-pages\n");
1475
- fossil_print(" fossil help -s ;# show all settings\n");
1476
- fossil_print(" fossil help -o ;# show global options\n");
1474
+ fossil_print(" fossil search -h PATTERN ;# search all help text\n");
1475
+ fossil_print(" fossil help -a ;# show all commands\n");
1476
+ fossil_print(" fossil help -w ;# show all web-pages\n");
1477
+ fossil_print(" fossil help -s ;# show all settings\n");
1478
+ fossil_print(" fossil help -o ;# show global options\n");
14771479
return;
14781480
}
14791481
z = pCmd->zHelp;
14801482
if( z==0 ){
14811483
fossil_fatal("no help available for the %s %s",
14821484
--- src/dispatch.c
+++ src/dispatch.c
@@ -1298,12 +1298,13 @@
1298 */
1299 void usage_cmd(void){
1300 help_cmd();
1301 }
1302
 
1303 /*
1304 ** COMMAND: apropos
1305 **
1306 ** Usage: %fossil apropos KEYWORD ...
1307 **
1308 ** Search the built-in help pages for Fossil for topics that
1309 ** match the KEYWORD(s)
@@ -1318,10 +1319,11 @@
1318 g.argc++;
1319 azNewArgv[g.argc] = 0;
1320 g.argv = azNewArgv;
1321 search_cmd();
1322 }
 
1323
1324 /*
1325 ** COMMAND: help
1326 **
1327 ** Usage: %fossil help [OPTIONS] [TOPIC] [SUBCOMMAND|options|PATTERN]
@@ -1429,11 +1431,11 @@
1429 "Usage: %s help TOPIC\n"
1430 "Things to try:\n\n"
1431 " %s help help\n"
1432 " %s help options\n"
1433 " %s help -a\n"
1434 " %s apropos TOPIC\n\n"
1435 "Other common values for TOPIC:\n\n",
1436 z, z, z, z, z);
1437 command_list(CMDFLAG_1ST_TIER,verboseFlag,useHtml);
1438 if( !verboseFlag ) version_cmd();
1439 return;
@@ -1467,15 +1469,15 @@
1467 n = dispatch_approx_match(g.argv[2], 5, az);
1468 for(i=0; i<n; i++){
1469 fossil_print(" * %s\n", az[i]);
1470 }
1471 fossil_print("Other commands to try:\n");
1472 fossil_print(" fossil apropos PATTERN ;# search all help text\n");
1473 fossil_print(" fossil help -a ;# show all commands\n");
1474 fossil_print(" fossil help -w ;# show all web-pages\n");
1475 fossil_print(" fossil help -s ;# show all settings\n");
1476 fossil_print(" fossil help -o ;# show global options\n");
1477 return;
1478 }
1479 z = pCmd->zHelp;
1480 if( z==0 ){
1481 fossil_fatal("no help available for the %s %s",
1482
--- src/dispatch.c
+++ src/dispatch.c
@@ -1298,12 +1298,13 @@
1298 */
1299 void usage_cmd(void){
1300 help_cmd();
1301 }
1302
1303 #if 0
1304 /*
1305 ** off-COMMAND: apropos
1306 **
1307 ** Usage: %fossil apropos KEYWORD ...
1308 **
1309 ** Search the built-in help pages for Fossil for topics that
1310 ** match the KEYWORD(s)
@@ -1318,10 +1319,11 @@
1319 g.argc++;
1320 azNewArgv[g.argc] = 0;
1321 g.argv = azNewArgv;
1322 search_cmd();
1323 }
1324 #endif
1325
1326 /*
1327 ** COMMAND: help
1328 **
1329 ** Usage: %fossil help [OPTIONS] [TOPIC] [SUBCOMMAND|options|PATTERN]
@@ -1429,11 +1431,11 @@
1431 "Usage: %s help TOPIC\n"
1432 "Things to try:\n\n"
1433 " %s help help\n"
1434 " %s help options\n"
1435 " %s help -a\n"
1436 " %s search -h TOPIC\n\n"
1437 "Other common values for TOPIC:\n\n",
1438 z, z, z, z, z);
1439 command_list(CMDFLAG_1ST_TIER,verboseFlag,useHtml);
1440 if( !verboseFlag ) version_cmd();
1441 return;
@@ -1467,15 +1469,15 @@
1469 n = dispatch_approx_match(g.argv[2], 5, az);
1470 for(i=0; i<n; i++){
1471 fossil_print(" * %s\n", az[i]);
1472 }
1473 fossil_print("Other commands to try:\n");
1474 fossil_print(" fossil search -h PATTERN ;# search all help text\n");
1475 fossil_print(" fossil help -a ;# show all commands\n");
1476 fossil_print(" fossil help -w ;# show all web-pages\n");
1477 fossil_print(" fossil help -s ;# show all settings\n");
1478 fossil_print(" fossil help -o ;# show global options\n");
1479 return;
1480 }
1481 z = pCmd->zHelp;
1482 if( z==0 ){
1483 fossil_fatal("no help available for the %s %s",
1484

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button