Fossil SCM

Recreate the ability to view all settings in a single command.

andybradford 2021-07-20 14:34 trunk merge
Commit 65f59beae9a790ef3b484aeae05baab39df928a999b77dec55be2340a82d07ba
1 file changed +11 -2
+11 -2
--- src/dispatch.c
+++ src/dispatch.c
@@ -565,11 +565,13 @@
565565
fossil_print("%s\n\n", aCommand[i].zHelp);
566566
}else{
567567
Blob txt;
568568
blob_init(&txt, 0, 0);
569569
help_to_text(aCommand[i].zHelp, &txt);
570
- fossil_print("# %s\n", aCommand[i].zName);
570
+ fossil_print("# %s%s\n", aCommand[i].zName,
571
+ (aCommand[i].eCmdFlags & CMDFLAG_VERSIONABLE)!=0 ?
572
+ " (versionable)" : "");
571573
fossil_print("%s\n\n", blob_str(&txt));
572574
blob_reset(&txt);
573575
}
574576
}
575577
if( useHtml ){
@@ -1030,10 +1032,11 @@
10301032
**
10311033
** -a|--all List both common and auxiliary commands
10321034
** -o|--options List command-line options common to all commands
10331035
** -s|--setting List setting names
10341036
** -t|--test List unsupported "test" commands
1037
+** -v|--verbose List both names and verbose details where possible
10351038
** -x|--aux List only auxiliary commands
10361039
** -w|--www List all web pages
10371040
** -f|--full List full set of commands (including auxiliary
10381041
** and unsupported "test" commands), options,
10391042
** settings, and web pages
@@ -1046,10 +1049,11 @@
10461049
*/
10471050
void help_cmd(void){
10481051
int rc;
10491052
int mask = CMDFLAG_ANY;
10501053
int isPage = 0;
1054
+ int verboseFlag = 0;
10511055
const char *z;
10521056
const char *zCmdOrPage;
10531057
const CmdOrPage *pCmd = 0;
10541058
int useHtml = 0;
10551059
Blob txt;
@@ -1062,10 +1066,11 @@
10621066
z, z, z);
10631067
command_list(0, CMDFLAG_1ST_TIER);
10641068
version_cmd();
10651069
return;
10661070
}
1071
+ verboseFlag = find_option("verbose","v",0)!=0;
10671072
if( find_option("options","o",0) ){
10681073
fossil_print("%s", zOptions);
10691074
return;
10701075
}
10711076
else if( find_option("all","a",0) ){
@@ -1083,11 +1088,15 @@
10831088
else if( find_option("test","t",0) ){
10841089
command_list(0, CMDFLAG_TEST);
10851090
return;
10861091
}
10871092
else if( find_option("setting","s",0) ){
1088
- command_list(0, CMDFLAG_SETTING);
1093
+ if( verboseFlag ){
1094
+ display_all_help(CMDFLAG_SETTING, 0, 0);
1095
+ }else{
1096
+ command_list(0, CMDFLAG_SETTING);
1097
+ }
10891098
return;
10901099
}
10911100
else if( find_option("full","f",0) ){
10921101
fossil_print("fossil commands:\n\n");
10931102
command_list(0, CMDFLAG_1ST_TIER);
10941103
--- src/dispatch.c
+++ src/dispatch.c
@@ -565,11 +565,13 @@
565 fossil_print("%s\n\n", aCommand[i].zHelp);
566 }else{
567 Blob txt;
568 blob_init(&txt, 0, 0);
569 help_to_text(aCommand[i].zHelp, &txt);
570 fossil_print("# %s\n", aCommand[i].zName);
 
 
571 fossil_print("%s\n\n", blob_str(&txt));
572 blob_reset(&txt);
573 }
574 }
575 if( useHtml ){
@@ -1030,10 +1032,11 @@
1030 **
1031 ** -a|--all List both common and auxiliary commands
1032 ** -o|--options List command-line options common to all commands
1033 ** -s|--setting List setting names
1034 ** -t|--test List unsupported "test" commands
 
1035 ** -x|--aux List only auxiliary commands
1036 ** -w|--www List all web pages
1037 ** -f|--full List full set of commands (including auxiliary
1038 ** and unsupported "test" commands), options,
1039 ** settings, and web pages
@@ -1046,10 +1049,11 @@
1046 */
1047 void help_cmd(void){
1048 int rc;
1049 int mask = CMDFLAG_ANY;
1050 int isPage = 0;
 
1051 const char *z;
1052 const char *zCmdOrPage;
1053 const CmdOrPage *pCmd = 0;
1054 int useHtml = 0;
1055 Blob txt;
@@ -1062,10 +1066,11 @@
1062 z, z, z);
1063 command_list(0, CMDFLAG_1ST_TIER);
1064 version_cmd();
1065 return;
1066 }
 
1067 if( find_option("options","o",0) ){
1068 fossil_print("%s", zOptions);
1069 return;
1070 }
1071 else if( find_option("all","a",0) ){
@@ -1083,11 +1088,15 @@
1083 else if( find_option("test","t",0) ){
1084 command_list(0, CMDFLAG_TEST);
1085 return;
1086 }
1087 else if( find_option("setting","s",0) ){
1088 command_list(0, CMDFLAG_SETTING);
 
 
 
 
1089 return;
1090 }
1091 else if( find_option("full","f",0) ){
1092 fossil_print("fossil commands:\n\n");
1093 command_list(0, CMDFLAG_1ST_TIER);
1094
--- src/dispatch.c
+++ src/dispatch.c
@@ -565,11 +565,13 @@
565 fossil_print("%s\n\n", aCommand[i].zHelp);
566 }else{
567 Blob txt;
568 blob_init(&txt, 0, 0);
569 help_to_text(aCommand[i].zHelp, &txt);
570 fossil_print("# %s%s\n", aCommand[i].zName,
571 (aCommand[i].eCmdFlags & CMDFLAG_VERSIONABLE)!=0 ?
572 " (versionable)" : "");
573 fossil_print("%s\n\n", blob_str(&txt));
574 blob_reset(&txt);
575 }
576 }
577 if( useHtml ){
@@ -1030,10 +1032,11 @@
1032 **
1033 ** -a|--all List both common and auxiliary commands
1034 ** -o|--options List command-line options common to all commands
1035 ** -s|--setting List setting names
1036 ** -t|--test List unsupported "test" commands
1037 ** -v|--verbose List both names and verbose details where possible
1038 ** -x|--aux List only auxiliary commands
1039 ** -w|--www List all web pages
1040 ** -f|--full List full set of commands (including auxiliary
1041 ** and unsupported "test" commands), options,
1042 ** settings, and web pages
@@ -1046,10 +1049,11 @@
1049 */
1050 void help_cmd(void){
1051 int rc;
1052 int mask = CMDFLAG_ANY;
1053 int isPage = 0;
1054 int verboseFlag = 0;
1055 const char *z;
1056 const char *zCmdOrPage;
1057 const CmdOrPage *pCmd = 0;
1058 int useHtml = 0;
1059 Blob txt;
@@ -1062,10 +1066,11 @@
1066 z, z, z);
1067 command_list(0, CMDFLAG_1ST_TIER);
1068 version_cmd();
1069 return;
1070 }
1071 verboseFlag = find_option("verbose","v",0)!=0;
1072 if( find_option("options","o",0) ){
1073 fossil_print("%s", zOptions);
1074 return;
1075 }
1076 else if( find_option("all","a",0) ){
@@ -1083,11 +1088,15 @@
1088 else if( find_option("test","t",0) ){
1089 command_list(0, CMDFLAG_TEST);
1090 return;
1091 }
1092 else if( find_option("setting","s",0) ){
1093 if( verboseFlag ){
1094 display_all_help(CMDFLAG_SETTING, 0, 0);
1095 }else{
1096 command_list(0, CMDFLAG_SETTING);
1097 }
1098 return;
1099 }
1100 else if( find_option("full","f",0) ){
1101 fossil_print("fossil commands:\n\n");
1102 command_list(0, CMDFLAG_1ST_TIER);
1103

Keyboard Shortcuts

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