Fossil SCM

Fix the /help webpage to accept prefixes on the cmd= query parameter.

drh 2020-08-08 23:55 trunk
Commit f2f419ea9b66f58dc88a480bdd441cb9e4c636bea111409923b565f741290eb0
2 files changed +1 -1 +2 -2
+1 -1
--- src/dispatch.c
+++ src/dispatch.c
@@ -717,11 +717,11 @@
717717
const CmdOrPage *pCmd = 0;
718718
719719
style_header("Help: %s", zCmd);
720720
721721
style_submenu_element("Command-List", "%s/help", g.zTop);
722
- rc = dispatch_name_search(zCmd, CMDFLAG_ANY, &pCmd);
722
+ rc = dispatch_name_search(zCmd, CMDFLAG_ANY|CMDFLAG_PREFIX, &pCmd);
723723
if( *zCmd=='/' ){
724724
/* Some of the webpages require query parameters in order to work.
725725
** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */
726726
@ <h1>The "%h(zCmd)" page:</h1>
727727
}else if( rc==0 && (pCmd->eCmdFlags & CMDFLAG_SETTING)!=0 ){
728728
--- src/dispatch.c
+++ src/dispatch.c
@@ -717,11 +717,11 @@
717 const CmdOrPage *pCmd = 0;
718
719 style_header("Help: %s", zCmd);
720
721 style_submenu_element("Command-List", "%s/help", g.zTop);
722 rc = dispatch_name_search(zCmd, CMDFLAG_ANY, &pCmd);
723 if( *zCmd=='/' ){
724 /* Some of the webpages require query parameters in order to work.
725 ** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */
726 @ <h1>The "%h(zCmd)" page:</h1>
727 }else if( rc==0 && (pCmd->eCmdFlags & CMDFLAG_SETTING)!=0 ){
728
--- src/dispatch.c
+++ src/dispatch.c
@@ -717,11 +717,11 @@
717 const CmdOrPage *pCmd = 0;
718
719 style_header("Help: %s", zCmd);
720
721 style_submenu_element("Command-List", "%s/help", g.zTop);
722 rc = dispatch_name_search(zCmd, CMDFLAG_ANY|CMDFLAG_PREFIX, &pCmd);
723 if( *zCmd=='/' ){
724 /* Some of the webpages require query parameters in order to work.
725 ** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */
726 @ <h1>The "%h(zCmd)" page:</h1>
727 }else if( rc==0 && (pCmd->eCmdFlags & CMDFLAG_SETTING)!=0 ){
728
+2 -2
--- src/sync.c
+++ src/sync.c
@@ -217,11 +217,11 @@
217217
** --ssh-command SSH Use SSH as the "ssh" command
218218
** -v|--verbose Additional (debugging) output
219219
** --verily Exchange extra information with the remote
220220
** to ensure no content is overlooked
221221
**
222
-** See also: [[clone]], [[configure]], [[push]], [[remote-url]], [[sync]]
222
+** See also: [[clone]], [[config]], [[push]], [[remote]], [[sync]]
223223
*/
224224
void pull_cmd(void){
225225
unsigned configFlags = 0;
226226
unsigned syncFlags = SYNC_PULL;
227227
unsigned urlOmitFlags = 0;
@@ -266,11 +266,11 @@
266266
** --ssh-command SSH Use SSH as the "ssh" command
267267
** -v|--verbose Additional (debugging) output
268268
** --verily Exchange extra information with the remote
269269
** to ensure no content is overlooked
270270
**
271
-** See also: [[clone]], [[configure]], [[pull]], [[remote-url]], [[sync]]
271
+** See also: [[clone]], [[config]], [[pull]], [[remote]], [[sync]]
272272
*/
273273
void push_cmd(void){
274274
unsigned configFlags = 0;
275275
unsigned syncFlags = SYNC_PUSH;
276276
process_sync_args(&configFlags, &syncFlags, 0, 0);
277277
--- src/sync.c
+++ src/sync.c
@@ -217,11 +217,11 @@
217 ** --ssh-command SSH Use SSH as the "ssh" command
218 ** -v|--verbose Additional (debugging) output
219 ** --verily Exchange extra information with the remote
220 ** to ensure no content is overlooked
221 **
222 ** See also: [[clone]], [[configure]], [[push]], [[remote-url]], [[sync]]
223 */
224 void pull_cmd(void){
225 unsigned configFlags = 0;
226 unsigned syncFlags = SYNC_PULL;
227 unsigned urlOmitFlags = 0;
@@ -266,11 +266,11 @@
266 ** --ssh-command SSH Use SSH as the "ssh" command
267 ** -v|--verbose Additional (debugging) output
268 ** --verily Exchange extra information with the remote
269 ** to ensure no content is overlooked
270 **
271 ** See also: [[clone]], [[configure]], [[pull]], [[remote-url]], [[sync]]
272 */
273 void push_cmd(void){
274 unsigned configFlags = 0;
275 unsigned syncFlags = SYNC_PUSH;
276 process_sync_args(&configFlags, &syncFlags, 0, 0);
277
--- src/sync.c
+++ src/sync.c
@@ -217,11 +217,11 @@
217 ** --ssh-command SSH Use SSH as the "ssh" command
218 ** -v|--verbose Additional (debugging) output
219 ** --verily Exchange extra information with the remote
220 ** to ensure no content is overlooked
221 **
222 ** See also: [[clone]], [[config]], [[push]], [[remote]], [[sync]]
223 */
224 void pull_cmd(void){
225 unsigned configFlags = 0;
226 unsigned syncFlags = SYNC_PULL;
227 unsigned urlOmitFlags = 0;
@@ -266,11 +266,11 @@
266 ** --ssh-command SSH Use SSH as the "ssh" command
267 ** -v|--verbose Additional (debugging) output
268 ** --verily Exchange extra information with the remote
269 ** to ensure no content is overlooked
270 **
271 ** See also: [[clone]], [[config]], [[pull]], [[remote]], [[sync]]
272 */
273 void push_cmd(void){
274 unsigned configFlags = 0;
275 unsigned syncFlags = SYNC_PUSH;
276 process_sync_args(&configFlags, &syncFlags, 0, 0);
277

Keyboard Shortcuts

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