Fossil SCM

Ignore empty command name in help page so that /help/ is treated the same as /help

andygoth 2016-11-05 14:17 trunk
Commit e237cea4c28f51de99a4aa65c7bf66bb38a7396f
1 file changed +1 -1
+1 -1
--- src/dispatch.c
+++ src/dispatch.c
@@ -233,11 +233,11 @@
233233
*/
234234
void help_page(void){
235235
const char *zCmd = P("cmd");
236236
237237
if( zCmd==0 ) zCmd = P("name");
238
- if( zCmd ){
238
+ if( zCmd && *zCmd ){
239239
int rc;
240240
const CmdOrPage *pCmd = 0;
241241
242242
style_header("Help: %s", zCmd);
243243
244244
--- src/dispatch.c
+++ src/dispatch.c
@@ -233,11 +233,11 @@
233 */
234 void help_page(void){
235 const char *zCmd = P("cmd");
236
237 if( zCmd==0 ) zCmd = P("name");
238 if( zCmd ){
239 int rc;
240 const CmdOrPage *pCmd = 0;
241
242 style_header("Help: %s", zCmd);
243
244
--- src/dispatch.c
+++ src/dispatch.c
@@ -233,11 +233,11 @@
233 */
234 void help_page(void){
235 const char *zCmd = P("cmd");
236
237 if( zCmd==0 ) zCmd = P("name");
238 if( zCmd && *zCmd ){
239 int rc;
240 const CmdOrPage *pCmd = 0;
241
242 style_header("Help: %s", zCmd);
243
244

Keyboard Shortcuts

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