Fossil SCM
help page uses detected command, not the given input parameter as header
Commit
9017bde28faac42de225e1ff7fe93ebcf4e5914c
Parent
47f4866bbc23bc2…
1 file changed
+3
-1
+3
-1
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -609,20 +609,22 @@ | ||
| 609 | 609 | |
| 610 | 610 | style_header("Command line help %s%s",zCmd?" - ":"",zCmd?zCmd:""); |
| 611 | 611 | if( zCmd ){ |
| 612 | 612 | int rc, idx; |
| 613 | 613 | |
| 614 | - @ <h1>%s(zCmd)</h1> | |
| 615 | 614 | rc = name_search(zCmd, aCommand, count(aCommand), &idx); |
| 616 | 615 | if( rc==1 ){ |
| 616 | + @ <h1>%s(zCmd)</h1> | |
| 617 | 617 | @ unknown command: %s(zCmd) |
| 618 | 618 | }else if( rc==2 ){ |
| 619 | + @ <h1>%s(zCmd)</h1> | |
| 619 | 620 | @ ambiguous command prefix: %s(zCmd) |
| 620 | 621 | }else{ |
| 621 | 622 | char *zSrc, *zDest; |
| 622 | 623 | int src,dest,len; |
| 623 | 624 | |
| 625 | + @ <h1>%s(aCommand[idx].zName)</h1> | |
| 624 | 626 | zSrc = (char*)aCmdHelp[idx]; |
| 625 | 627 | if( zSrc==0 || *zSrc==0 ){ |
| 626 | 628 | @ no help available for the %s(aCommand[idx].zName) command |
| 627 | 629 | }else{ |
| 628 | 630 | len = strlen(zSrc); |
| 629 | 631 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -609,20 +609,22 @@ | |
| 609 | |
| 610 | style_header("Command line help %s%s",zCmd?" - ":"",zCmd?zCmd:""); |
| 611 | if( zCmd ){ |
| 612 | int rc, idx; |
| 613 | |
| 614 | @ <h1>%s(zCmd)</h1> |
| 615 | rc = name_search(zCmd, aCommand, count(aCommand), &idx); |
| 616 | if( rc==1 ){ |
| 617 | @ unknown command: %s(zCmd) |
| 618 | }else if( rc==2 ){ |
| 619 | @ ambiguous command prefix: %s(zCmd) |
| 620 | }else{ |
| 621 | char *zSrc, *zDest; |
| 622 | int src,dest,len; |
| 623 | |
| 624 | zSrc = (char*)aCmdHelp[idx]; |
| 625 | if( zSrc==0 || *zSrc==0 ){ |
| 626 | @ no help available for the %s(aCommand[idx].zName) command |
| 627 | }else{ |
| 628 | len = strlen(zSrc); |
| 629 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -609,20 +609,22 @@ | |
| 609 | |
| 610 | style_header("Command line help %s%s",zCmd?" - ":"",zCmd?zCmd:""); |
| 611 | if( zCmd ){ |
| 612 | int rc, idx; |
| 613 | |
| 614 | rc = name_search(zCmd, aCommand, count(aCommand), &idx); |
| 615 | if( rc==1 ){ |
| 616 | @ <h1>%s(zCmd)</h1> |
| 617 | @ unknown command: %s(zCmd) |
| 618 | }else if( rc==2 ){ |
| 619 | @ <h1>%s(zCmd)</h1> |
| 620 | @ ambiguous command prefix: %s(zCmd) |
| 621 | }else{ |
| 622 | char *zSrc, *zDest; |
| 623 | int src,dest,len; |
| 624 | |
| 625 | @ <h1>%s(aCommand[idx].zName)</h1> |
| 626 | zSrc = (char*)aCmdHelp[idx]; |
| 627 | if( zSrc==0 || *zSrc==0 ){ |
| 628 | @ no help available for the %s(aCommand[idx].zName) command |
| 629 | }else{ |
| 630 | len = strlen(zSrc); |
| 631 |