Index: src/main.c ================================================================== --- src/main.c +++ src/main.c @@ -683,19 +683,32 @@ if( find_option("localtime",0,0) ) g.fTimeFormat = 2; if( zChdir && file_chdir(zChdir, 0) ){ fossil_fatal("unable to change directories to %s", zChdir); } if( find_option("help",0,0)!=0 ){ - /* --help anywhere on the command line is translated into - ** "fossil help argv[1] argv[2]..." */ - int i; + /* If --help is found anywhere on the command line, translate the command + * to "fossil help cmdname" where "cmdname" is the first argument that + * does not begin with a "-" character. If all arguments start with "-", + * translate to "fossil help argv[1] argv[2]...". */ + int i, nNewArgc; char **zNewArgv = fossil_malloc( sizeof(char*)*(g.argc+2) ); - for(i=1; i