Index: src/dispatch.c ================================================================== --- src/dispatch.c +++ src/dispatch.c @@ -125,11 +125,13 @@ && strncmp(zName, aCommand[lwr].zName, nName)==0; ++lwr ){ if( aCommand[lwr].eCmdFlags & eType ){ if( mid<0 ){ mid = lwr; /* Potential ambiguous prefix */ }else{ - return 2; /* Confirmed ambiguous prefix */ + if( aCommand[lwr].xFunc != aCommand[mid].xFunc ){ + return 2; /* Confirmed ambiguous prefix */ + } } } } if( mid>=0 ){ *ppCmd = &aCommand[mid]; @@ -207,16 +209,21 @@ return 0; } /* ** Fill Blob with a space-separated list of all command names that -** match the prefix zPrefix. +** match the prefix zPrefix and the eType CMDFLAGS_ bits. */ -void dispatch_matching_names(const char *zPrefix, Blob *pList){ +void dispatch_matching_names( + const char *zPrefix, /* name prefix */ + unsigned eType, /* CMDFLAG_ bits */ + Blob *pList /* space-separated list of command names */ +){ int i; int nPrefix = (int)strlen(zPrefix); for(i=FOSSIL_FIRST_CMD; i