Check-in [151406f34c]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Make use of the ssh_add_path_argument() function for the implementation of "fossil ui REMOTE:folder".
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 151406f34c4632bd528c937d5eb4007566e78cf8aded761a3c37539d397b865c
User & Date: drh 2024-02-06 23:59:14.369
Context
2024-02-07
12:16
For the "fossil ui REMOTE:path" command, initially omit the PATH= prefix but add it in if the initial attempt fails to find a fossil executable. check-in: ed6495baa6 user: drh tags: trunk
2024-02-06
23:59
Make use of the ssh_add_path_argument() function for the implementation of "fossil ui REMOTE:folder". check-in: 151406f34c user: drh tags: trunk
23:45
Detailed header comment on the ssh_add_path_argument() function explaining what this PATH= business is all about, for future reference. check-in: ac52d12e66 user: drh tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/main.c.
3350
3351
3352
3353
3354
3355
3356

3357
3358
3359
3360
3361
3362
3363
3364
    transport_ssh_command(&ssh);
    db_close_config();
    blob_appendf(&ssh,
       " -t -L 127.0.0.1:%d:127.0.0.1:%d %!$",
       iPort, iPort, zRemote
    );
    if( zFossilCmd==0 ){

      blob_appendf(&ssh, " %$ fossil", "PATH=$HOME/bin:$PATH");
    }else{
      blob_appendf(&ssh, " %$", zFossilCmd);
    }
    blob_appendf(&ssh, " ui --nobrowser --localauth --port %d", iPort);
    if( zNotFound ) blob_appendf(&ssh, " --notfound %!$", zNotFound);
    if( zFileGlob ) blob_appendf(&ssh, " --files-urlenc %T", zFileGlob);
    if( g.zCkoutAlias ) blob_appendf(&ssh, " --ckout-alias %!$",g.zCkoutAlias);







>
|







3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
    transport_ssh_command(&ssh);
    db_close_config();
    blob_appendf(&ssh,
       " -t -L 127.0.0.1:%d:127.0.0.1:%d %!$",
       iPort, iPort, zRemote
    );
    if( zFossilCmd==0 ){
      ssh_add_path_argument(&ssh);
      blob_append_escaped_arg(&ssh, "fossil", 1);
    }else{
      blob_appendf(&ssh, " %$", zFossilCmd);
    }
    blob_appendf(&ssh, " ui --nobrowser --localauth --port %d", iPort);
    if( zNotFound ) blob_appendf(&ssh, " --notfound %!$", zNotFound);
    if( zFileGlob ) blob_appendf(&ssh, " --files-urlenc %T", zFileGlob);
    if( g.zCkoutAlias ) blob_appendf(&ssh, " --ckout-alias %!$",g.zCkoutAlias);