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 /).
Commit
aa5def064dc30622d642e32065b1242823db72e5
Parent
6ca6624499718ab…
1 file changed
+4
-4
+4
-4
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -1040,13 +1040,13 @@ | ||
| 1040 | 1040 | if( zCmd==0 ) zCmd = P("name"); |
| 1041 | 1041 | style_header("Command-line Help"); |
| 1042 | 1042 | if( zCmd ){ |
| 1043 | 1043 | int rc, idx; |
| 1044 | 1044 | char *z, *s, *d; |
| 1045 | - | |
| 1045 | + char const * zCmdOrPage = ('/'==*zCmd) ? "page" : "command"; | |
| 1046 | 1046 | 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> | |
| 1048 | 1048 | rc = name_search(zCmd, aCommand, count(aCommand), &idx); |
| 1049 | 1049 | if( rc==1 ){ |
| 1050 | 1050 | @ unknown command: %s(zCmd) |
| 1051 | 1051 | }else if( rc==2 ){ |
| 1052 | 1052 | @ ambiguous command prefix: %s(zCmd) |
| @@ -1113,13 +1113,13 @@ | ||
| 1113 | 1113 | if( '/'!=*z ) continue; |
| 1114 | 1114 | if( j==0 ){ |
| 1115 | 1115 | @ <td valign="top"><ul> |
| 1116 | 1116 | } |
| 1117 | 1117 | 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> | |
| 1119 | 1119 | }else{ |
| 1120 | - @ <li>%s(z)</li> | |
| 1120 | + @ <li>%s(z+1)</li> | |
| 1121 | 1121 | } |
| 1122 | 1122 | j++; |
| 1123 | 1123 | if( j>=n ){ |
| 1124 | 1124 | @ </ul></td> |
| 1125 | 1125 | j = 0; |
| 1126 | 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 | |
| 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 |