Fossil SCM

/help now removes the leading slashes from the page list (looks cleaner). /help?cmd=foo now shows a different label for pages and commands (differentiates based on existence of leading /).

stephan 2013-02-21 09:57 UTC help-www
Commit aa5def064dc30622d642e32065b1242823db72e5
1 file changed +4 -4
+4 -4
--- src/main.c
+++ src/main.c
@@ -1040,13 +1040,13 @@
10401040
if( zCmd==0 ) zCmd = P("name");
10411041
style_header("Command-line Help");
10421042
if( zCmd ){
10431043
int rc, idx;
10441044
char *z, *s, *d;
1045
-
1045
+ char const * zCmdOrPage = ('/'==*zCmd) ? "page" : "command";
10461046
style_submenu_element("Command-List", "Command-List", "%s/help", g.zTop);
1047
- @ <h1>The "%s(zCmd)" command:</h1>
1047
+ @ <h1>The "%s(zCmd)" %s(zCmdOrPage):</h1>
10481048
rc = name_search(zCmd, aCommand, count(aCommand), &idx);
10491049
if( rc==1 ){
10501050
@ unknown command: %s(zCmd)
10511051
}else if( rc==2 ){
10521052
@ ambiguous command prefix: %s(zCmd)
@@ -1113,13 +1113,13 @@
11131113
if( '/'!=*z ) continue;
11141114
if( j==0 ){
11151115
@ <td valign="top"><ul>
11161116
}
11171117
if( aCmdHelp[i].zText && *aCmdHelp[i].zText ){
1118
- @ <li><a href="%s(g.zTop)/help?cmd=%s(z)">%s(z)</a></li>
1118
+ @ <li><a href="%s(g.zTop)/help?cmd=%s(z)">%s(z+1)</a></li>
11191119
}else{
1120
- @ <li>%s(z)</li>
1120
+ @ <li>%s(z+1)</li>
11211121
}
11221122
j++;
11231123
if( j>=n ){
11241124
@ </ul></td>
11251125
j = 0;
11261126
--- src/main.c
+++ src/main.c
@@ -1040,13 +1040,13 @@
1040 if( zCmd==0 ) zCmd = P("name");
1041 style_header("Command-line Help");
1042 if( zCmd ){
1043 int rc, idx;
1044 char *z, *s, *d;
1045
1046 style_submenu_element("Command-List", "Command-List", "%s/help", g.zTop);
1047 @ <h1>The "%s(zCmd)" command:</h1>
1048 rc = name_search(zCmd, aCommand, count(aCommand), &idx);
1049 if( rc==1 ){
1050 @ unknown command: %s(zCmd)
1051 }else if( rc==2 ){
1052 @ ambiguous command prefix: %s(zCmd)
@@ -1113,13 +1113,13 @@
1113 if( '/'!=*z ) continue;
1114 if( j==0 ){
1115 @ <td valign="top"><ul>
1116 }
1117 if( aCmdHelp[i].zText && *aCmdHelp[i].zText ){
1118 @ <li><a href="%s(g.zTop)/help?cmd=%s(z)">%s(z)</a></li>
1119 }else{
1120 @ <li>%s(z)</li>
1121 }
1122 j++;
1123 if( j>=n ){
1124 @ </ul></td>
1125 j = 0;
1126
--- src/main.c
+++ src/main.c
@@ -1040,13 +1040,13 @@
1040 if( zCmd==0 ) zCmd = P("name");
1041 style_header("Command-line Help");
1042 if( zCmd ){
1043 int rc, idx;
1044 char *z, *s, *d;
1045 char const * zCmdOrPage = ('/'==*zCmd) ? "page" : "command";
1046 style_submenu_element("Command-List", "Command-List", "%s/help", g.zTop);
1047 @ <h1>The "%s(zCmd)" %s(zCmdOrPage):</h1>
1048 rc = name_search(zCmd, aCommand, count(aCommand), &idx);
1049 if( rc==1 ){
1050 @ unknown command: %s(zCmd)
1051 }else if( rc==2 ){
1052 @ ambiguous command prefix: %s(zCmd)
@@ -1113,13 +1113,13 @@
1113 if( '/'!=*z ) continue;
1114 if( j==0 ){
1115 @ <td valign="top"><ul>
1116 }
1117 if( aCmdHelp[i].zText && *aCmdHelp[i].zText ){
1118 @ <li><a href="%s(g.zTop)/help?cmd=%s(z)">%s(z+1)</a></li>
1119 }else{
1120 @ <li>%s(z+1)</li>
1121 }
1122 j++;
1123 if( j>=n ){
1124 @ </ul></td>
1125 j = 0;
1126

Keyboard Shortcuts

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