Fossil SCM
Recreate the ability to view all settings in a single command.
Commit
65f59beae9a790ef3b484aeae05baab39df928a999b77dec55be2340a82d07ba
Parent
482c1c9ee8a0696…
1 file changed
+11
-2
+11
-2
| --- src/dispatch.c | ||
| +++ src/dispatch.c | ||
| @@ -565,11 +565,13 @@ | ||
| 565 | 565 | fossil_print("%s\n\n", aCommand[i].zHelp); |
| 566 | 566 | }else{ |
| 567 | 567 | Blob txt; |
| 568 | 568 | blob_init(&txt, 0, 0); |
| 569 | 569 | 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)" : ""); | |
| 571 | 573 | fossil_print("%s\n\n", blob_str(&txt)); |
| 572 | 574 | blob_reset(&txt); |
| 573 | 575 | } |
| 574 | 576 | } |
| 575 | 577 | if( useHtml ){ |
| @@ -1030,10 +1032,11 @@ | ||
| 1030 | 1032 | ** |
| 1031 | 1033 | ** -a|--all List both common and auxiliary commands |
| 1032 | 1034 | ** -o|--options List command-line options common to all commands |
| 1033 | 1035 | ** -s|--setting List setting names |
| 1034 | 1036 | ** -t|--test List unsupported "test" commands |
| 1037 | +** -v|--verbose List both names and verbose details where possible | |
| 1035 | 1038 | ** -x|--aux List only auxiliary commands |
| 1036 | 1039 | ** -w|--www List all web pages |
| 1037 | 1040 | ** -f|--full List full set of commands (including auxiliary |
| 1038 | 1041 | ** and unsupported "test" commands), options, |
| 1039 | 1042 | ** settings, and web pages |
| @@ -1046,10 +1049,11 @@ | ||
| 1046 | 1049 | */ |
| 1047 | 1050 | void help_cmd(void){ |
| 1048 | 1051 | int rc; |
| 1049 | 1052 | int mask = CMDFLAG_ANY; |
| 1050 | 1053 | int isPage = 0; |
| 1054 | + int verboseFlag = 0; | |
| 1051 | 1055 | const char *z; |
| 1052 | 1056 | const char *zCmdOrPage; |
| 1053 | 1057 | const CmdOrPage *pCmd = 0; |
| 1054 | 1058 | int useHtml = 0; |
| 1055 | 1059 | Blob txt; |
| @@ -1062,10 +1066,11 @@ | ||
| 1062 | 1066 | z, z, z); |
| 1063 | 1067 | command_list(0, CMDFLAG_1ST_TIER); |
| 1064 | 1068 | version_cmd(); |
| 1065 | 1069 | return; |
| 1066 | 1070 | } |
| 1071 | + verboseFlag = find_option("verbose","v",0)!=0; | |
| 1067 | 1072 | if( find_option("options","o",0) ){ |
| 1068 | 1073 | fossil_print("%s", zOptions); |
| 1069 | 1074 | return; |
| 1070 | 1075 | } |
| 1071 | 1076 | else if( find_option("all","a",0) ){ |
| @@ -1083,11 +1088,15 @@ | ||
| 1083 | 1088 | else if( find_option("test","t",0) ){ |
| 1084 | 1089 | command_list(0, CMDFLAG_TEST); |
| 1085 | 1090 | return; |
| 1086 | 1091 | } |
| 1087 | 1092 | 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 | + } | |
| 1089 | 1098 | return; |
| 1090 | 1099 | } |
| 1091 | 1100 | else if( find_option("full","f",0) ){ |
| 1092 | 1101 | fossil_print("fossil commands:\n\n"); |
| 1093 | 1102 | command_list(0, CMDFLAG_1ST_TIER); |
| 1094 | 1103 |
| --- 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 |