diskrsync icon indicating copy to clipboard operation
diskrsync copied to clipboard

Please document how the remote diskrsync is found

Open grinapo opened this issue 2 years ago • 3 comments

I noticed that diskrsync was pretty flexible in finding ./diskrsync at the remote end (it was not in the path). How is the remote called exactly, how does it try to find the remote program to run?

If you tell me I'll create a PR against the README if you want.

(Sidenote: the included help use -verbose format while the usage use --verbose format [double dash], maybe these shall be synced.)

grinapo avatar Sep 07 '23 15:09 grinapo

It's run on the remote end exactly the same way as you ran it locally, i.e. if it's called with "./diskrsync" it will be called as "./diskrsync" on the remote.

As for the single dash, where do you see it? I can'r find any instances in the project.

dop251 avatar Sep 11 '23 10:09 dop251

  1. Would be nice if that was documented, don't you think?

  2. I guess it's the result of a go module.

$ ./diskrsync -h
Usage of ./diskrsync:
  -calc-progress
        Write calc progress
  -no-compress
        Store target as a raw file
  -source
        Source mode
  -ssh-flags string
        SSH flags
  -sync-progress
        Write sync progress
  -target
        Target mode
  -verbose
        Print statistics, progress, and some debug info

grinapo avatar Sep 11 '23 11:09 grinapo

This looks like an output from an older version, this is what I get:

$ diskrsync -h
Usage of diskrsync:
      --cmd-path string    Remote command path (defaults to argv[0])
      --no-compress        Store target as a raw file
      --ssh-flags string   SSH flags
      --verbose            Print statistics, progress, and some debug info
pflag: help requested

(note "defaults to argv[0]"). BTW, when run without arguments it gives:

$ diskrsync
Usage: diskrsync [flags] <src> <dst>
src and dst is [[user@]host:]path

Flags:
      --cmd-path string    Remote command path (defaults to argv[0])
      --no-compress        Store target as a raw file
      --ssh-flags string   SSH flags
      --verbose            Print statistics, progress, and some debug info

Ideally, the output from -h should match this one. If you know how to do this, please open a PR.

dop251 avatar Sep 12 '23 10:09 dop251