| | @@ -606,11 +606,11 @@ |
| 606 | 606 | */ |
| 607 | 607 | void help_page(void){ |
| 608 | 608 | const char * zCmd = P("cmd"); |
| 609 | 609 | |
| 610 | 610 | style_header("Command line help %s%s",zCmd?" - ":"",zCmd?zCmd:""); |
| 611 | | - if( zCmd && zCmd[0] ){ |
| 611 | + if( zCmd && zCmd[0] && strcmp(zCmd,"test") ){ |
| 612 | 612 | int rc, idx; |
| 613 | 613 | |
| 614 | 614 | rc = name_search(zCmd, aCommand, count(aCommand), &idx); |
| 615 | 615 | if( rc==1 ){ |
| 616 | 616 | @ <h1>unknown command: %s(zCmd)</h1> |
| | @@ -687,30 +687,37 @@ |
| 687 | 687 | } |
| 688 | 688 | @ see also the list of |
| 689 | 689 | @ <a href="help">available commands</a> in fossil |
| 690 | 690 | @ version %s(MANIFEST_VERSION" "MANIFEST_DATE) UTC |
| 691 | 691 | }else{ |
| 692 | | - int nCol, nRow, i, tests, cnt; |
| 692 | + int nCol, nRow, i, ignored, cnt, showTest; |
| 693 | 693 | |
| 694 | | - for( i=0,tests=0; i<count(aCommand); i++){ |
| 695 | | - if( strncmp(aCommand[i].zName,"test",4)==0 ) tests++; |
| 694 | + /* detect, if we show normal or test commands */ |
| 695 | + showTest = ( zCmd && !strncmp(zCmd,"test",4) ); |
| 696 | + for( i=0,ignored=0; i<count(aCommand); i++){ |
| 697 | + if( (strncmp(aCommand[i].zName,"test",4)==0) ^ showTest ) ignored++; |
| 696 | 698 | } |
| 697 | 699 | nCol = 4; |
| 698 | | - nRow = (count(aCommand)-tests+nCol-1)/nCol; |
| 700 | + nRow = (count(aCommand)-ignored+nCol-1)/nCol; |
| 699 | 701 | @ <h1>Available commands</h1> |
| 700 | 702 | @ <table class="browser"><tr><td class="browser"><ul class="browser"> |
| 701 | 703 | for( i=cnt=0; i<count(aCommand); i++ ){ |
| 702 | 704 | if( cnt==nRow ){ |
| 703 | 705 | @ </ul></td><td class="browser"><ul class="browser"> |
| 704 | | - cnt=0; |
| 706 | + cnt=0; |
| 705 | 707 | } |
| 706 | | - if( strncmp(aCommand[i].zName,"test",4)==0 ) continue; |
| 708 | + if( (strncmp(aCommand[i].zName,"test",4)==0) ^ showTest ) continue; |
| 707 | 709 | @ <li><kbd><a href="help?cmd=%s(aCommand[i].zName)"> |
| 708 | 710 | @ %s(aCommand[i].zName)</a></kbd></li> |
| 709 | 711 | cnt++; |
| 710 | 712 | } |
| 711 | 713 | @ </ul></td></tr></table> |
| 714 | + if( showTest ){ |
| 715 | + @ <a href="help">show standard commands</a> |
| 716 | + }else{ |
| 717 | + @ <a class="hidden" href="help?cmd=test">show test commands</a> |
| 718 | + } |
| 712 | 719 | @ <hr/>fossil version %s(MANIFEST_VERSION" "MANIFEST_DATE) UTC |
| 713 | 720 | } |
| 714 | 721 | style_footer(); |
| 715 | 722 | } |
| 716 | 723 | |
| 717 | 724 | |