diff --git a/manifest b/manifest index 1b86f1fb0a938c0256683d014c6c02917add38fa..edff31667afb1a1b9a7cb99a64de934e8567b0c2 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C /help\snow\sremoves\sthe\sleading\sslashes\sfrom\sthe\spage\slist\s(looks\scleaner).\s/help?cmd=foo\snow\sshows\sa\sdifferent\slabel\sfor\spages\sand\scommands\s(differentiates\sbased\son\sexistence\sof\sleading\s/). -D 2013-02-21T09:57:59.031 +C CLI\shelp\scommand\snow\s(cosmetically)\sdifferentiates\sbetween\spages\sand\scommands. +D 2013-02-21T19:41:13.222 F .project b7b33febfaccfeae87eb1d782cd0c675679b7dc7 F .settings/org.eclipse.core.resources.prefs 6d8a06b0a3395c74037897476eadb764d7f2d22d F .settings/org.eclipse.core.runtime.prefs 6cc9381da1eff8e6dac0e41121d3cce3f1b4761b @@ -347,7 +347,7 @@ F src/json_user.c b68775a2900614e8365637635bd26bac378d506c F src/json_wiki.c 58841d7f80bca3c98f1fe7aba7039fdb9be48e8f F src/leaf.c 7746adfcb013ec9886da259ffe5a87270d44e406 F src/login.c 0653afe89cae80b756ab95bdc4cf20bbd301c6fe -F src/main.c 23ecc98e163ddff250f6d6c3050156dfdbcff26c +F src/main.c b9f9f6acc38cbcbacfa2ec4fd01c2fd05f989eb6 F src/main.mk 84ced07b8fcc016cfeba892e5bbb2d3c60c83968 F src/makeheaders.c d0855feacdb7145573d938c85de645de51b4b277 F src/makeheaders.html 4428f89f94c3b333b106171fe63f2c175d0ee53b @@ -599,8 +599,8 @@ F www/tickets.wiki 74561cedee65fa362e67970911a0415f723457db F www/uitest.html b4160b619cb6694c0caebd13422b15a3182e5dee F www/webui.wiki d6f45339cf55d9e249afc46f062e1fd62519231f F www/wikitheory.wiki 4100c1164995d26295591cf8d4170a87ad8d1c43 -P 6ca6624499718ab3cf5de9c40f9b4a9ec2dad9ce -R 70d4b19d39338a243cb8c80ba9eccd47 +P aa5def064dc30622d642e32065b1242823db72e5 +R 6b94bf0bcad4eeba260eb46a75534aa4 U stephan -Z 352a556e8ea9ea02f582ca6d01088b0c +Z f0b07ce1745cada34d1b16003746d653 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index a93704db563c8cb21b1edda259e59abb9d763b94..0253f9d3b36817012d90d70e8d8958859bdf8a26 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -aa5def064dc30622d642e32065b1242823db72e5 \ No newline at end of file +5be5933348f138a3b6d295ad226212f906e1ef04 \ No newline at end of file diff --git a/src/main.c b/src/main.c index 76a2170305183d36b969cbca76293fe196bc9ef3..7005d67e334dadd07130b9b6792a07d4463f12fa 100644 --- a/src/main.c +++ b/src/main.c @@ -974,8 +974,10 @@ void version_cmd(void){ ** %fossil help --www Show list of WWW pages */ void help_cmd(void){ - int rc, idx; + int rc, idx, isPage = 0; const char *z; + char const * zCmdOrPage; + char const * zCmdOrPagePlural; if( g.argc<3 ){ z = g.argv[0]; fossil_print( @@ -1002,21 +1004,30 @@ void help_cmd(void){ command_list(0, CMDFLAG_TEST); return; } + isPage = ('/' == *g.argv[2]) ? 1 : 0; + if(isPage){ + zCmdOrPage = "page"; + zCmdOrPagePlural = "pages"; + }else{ + zCmdOrPage = "command"; + zCmdOrPagePlural = "commands"; + } rc = name_search(g.argv[2], aCommand, count(aCommand), &idx); if( rc==1 ){ - fossil_print("unknown command: %s\nAvailable commands:\n", g.argv[2]); - command_list(0, 0xff & ~CMDFLAG_WEBPAGE); + fossil_print("unknown %s: %s\nAvailable %s:\n", + zCmdOrPage, g.argv[2], zCmdOrPagePlural); + command_list(0, isPage ? CMDFLAG_WEBPAGE : (0xff & ~CMDFLAG_WEBPAGE)); fossil_exit(1); }else if( rc==2 ){ - fossil_print("ambiguous command prefix: %s\nMatching commands:\n", - g.argv[2]); + fossil_print("ambiguous %s prefix: %s\nMatching %s:\n", + zCmdOrPage, g.argv[2], zCmdOrPagePlural); command_list(g.argv[2], 0xff); fossil_exit(1); } z = aCmdHelp[idx].zText; if( z==0 ){ - fossil_fatal("no help available for the %s command", - aCommand[idx].zName); + fossil_fatal("no help available for the %s %s", + aCommand[idx].zName, zCmdOrPage); } while( *z ){ if( *z=='%' && strncmp(z, "%fossil", 7)==0 ){